[PATCH v4 06/25] drivers/bus: remove device and driver checks in unplug
fengchengwen
fengchengwen at huawei.com
Fri May 29 06:16:30 CEST 2026
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
On 5/27/2026 3:56 PM, David Marchand wrote:
> rte_dev_remove() checks if a device is probed before calling the bus
> unplug operation. Individual bus detach/remove functions checking that
> dev->driver is non-NULL are therefore redundant.
>
> However, when the unplug operation is called at bus cleanup, care must
> be taken that devices are in probed state, so some check on
> rte_dev_is_probed() must be added.
>
> The device parameter passed to bus unplug 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 .unplug is done after dereferencing this pointer.
>
> 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