diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-11-27 10:35:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 10:37:12 -0800 |
commit | c578abbc20762aa58e390e55252959853eeea17e (patch) | |
tree | e8870796fae1541b7c7978d85d0ac486cd9842db /drivers | |
parent | fbfb14455391b89edcf37327526988dea7849532 (diff) |
driver core: Don't stop probing on ->probe errors.
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@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/dd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 510e7884975f..f70513748947 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -136,18 +136,17 @@ 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 { + if (ret != -ENODEV && ret != -ENXIO) { /* 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); |