diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2021-12-31 11:39:01 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-06 15:47:41 +0100 |
commit | 00eb74ea2c14418042347eaa34c6b73ac6ec1e76 (patch) | |
tree | 9cf81a6b6cdf7f123e7db126ef1a2e446b8b65aa /drivers/base | |
parent | 885e50253bfd6750327a265405461496d6af1639 (diff) |
driver core: Make bus notifiers in right order in really_probe()
If a driver cannot be bound to a device, the correct bus notifier order
should be:
- BUS_NOTIFY_BIND_DRIVER: driver is about to be bound
- BUS_NOTIFY_DRIVER_NOT_BOUND: driver failed to be bound
or no notifier if the failure happens before the actual binding.
The really_probe() notifies a BUS_NOTIFY_DRIVER_NOT_BOUND event without
a BUS_NOTIFY_BIND_DRIVER if .dma_configure() returns failure. This
change makes the notifiers in order.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20211231033901.2168664-3-baolu.lu@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/dd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index f6fac016b811..9eaaff2f556c 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -577,7 +577,7 @@ re_probe: if (dev->bus->dma_configure) { ret = dev->bus->dma_configure(dev); if (ret) - goto sysfs_failed; + goto pinctrl_bind_failed; } ret = driver_sysfs_add(dev); |