]> git.baikalelectronics.ru Git - kernel.git/commit
driver core: Make bus notifiers in right order in really_probe()
authorLu Baolu <baolu.lu@linux.intel.com>
Fri, 31 Dec 2021 03:39:01 +0000 (11:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jan 2022 14:47:41 +0000 (15:47 +0100)
commitf8e117fbb915f832fdd353734bdc61695ea54b0f
tree9cf81a6b6cdf7f123e7db126ef1a2e446b8b65aa
parent85bc2d95b7ce770b4f3fc4a08375227b854323f8
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>
drivers/base/dd.c