[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061016104408.075c6151@gondolin.boeblingen.de.ibm.com>
Date: Mon, 16 Oct 2006 10:44:08 +0200
From: Cornelia Huck <cornelia.huck@...ibm.com>
To: Greg K-H <greg@...ah.com>
Cc: Alan Stern <stern@...land.harvard.edu>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: [Patch 1/3] Driver core: Don't stop probing on ->probe errors.
From: Cornelia Huck <cornelia.huck@...ibm.com>
Don't stop on the first ->probe error that is not -ENODEV/-ENXIO.
There might be a driver registered returning an unresonable return code, and
this stops probing completely even though it may make sense to try the next
possible driver. At worst, we may end up with an unbound device.
Signed-off-by: Cornelia Huck <cornelia.huck@...ibm.com>
---
drivers/base/dd.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
--- linux-2.6.orig/drivers/base/dd.c
+++ linux-2.6/drivers/base/dd.c
@@ -128,18 +128,11 @@ probe_failed:
driver_sysfs_remove(dev);
dev->driver = NULL;
- if (ret == -ENODEV || ret == -ENXIO) {
- /* Driver matched, but didn't support device
- * or device not found.
- * Not an error; keep going.
- */
- ret = 0;
- } else {
- /* driver matched but the probe failed */
- printk(KERN_WARNING
- "%s: probe of %s failed with error %d\n",
- drv->name, dev->bus_id, ret);
- }
+ /*
+ * Ignore errors returned by ->probe so that the next driver can try
+ * its luck.
+ */
+ ret = 0;
done:
kfree(data);
atomic_dec(&probe_count);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists