[PATCH v4 05/25] bus: remove device and driver checks in DMA map/unmap
fengchengwen
fengchengwen at huawei.com
Fri May 29 05:57:24 CEST 2026
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
On 5/27/2026 3:56 PM, David Marchand wrote:
> Add rte_dev_is_probed() check in rte_dev_dma_map() and
> rte_dev_dma_unmap() before calling bus-specific implementations.
>
> The device parameter passed to bus DMA map/unmap operations cannot be
> NULL as the caller already dereferenced the bus structure to invoke
> these operations.
> The driver reference in the bus-specific device cannot be NULL since
> calling the .dma_map is done after dereferencing this pointer.
>
> Remove redundant checks on probed device, and NULL checks on the
> device/driver parameter and derived device/driver pointers.
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list