From: Lu Baolu <baolu.lu@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Kay Sievers <kay.sievers@novell.com>,
linux-kernel@vger.kernel.org, Lu Baolu <baolu.lu@linux.intel.com>
Subject: [PATCH v2 2/2] driver core: Make bus notifiers in right order in really_probe()
Date: Fri, 31 Dec 2021 11:39:01 +0800 [thread overview]
Message-ID: <20211231033901.2168664-3-baolu.lu@linux.intel.com> (raw)
In-Reply-To: <20211231033901.2168664-1-baolu.lu@linux.intel.com>
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>
---
drivers/base/dd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 @@ static int really_probe(struct device *dev, struct device_driver *drv)
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);
--
2.25.1
prev parent reply other threads:[~2021-12-31 3:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-31 3:38 [PATCH v2 0/2] Couple of cleanups in really_probe() Lu Baolu
2021-12-31 3:39 ` [PATCH v2 1/2] driver core: Move driver_sysfs_remove() after driver_sysfs_add() Lu Baolu
2021-12-31 3:39 ` Lu Baolu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211231033901.2168664-3-baolu.lu@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kay.sievers@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.