diff options
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r-- | drivers/base/dd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 616b4bbacf1b..18dba8e78da7 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -232,7 +232,7 @@ static int device_probe_drivers(void *data) * * Returns 1 if the device was bound to a driver; * 0 if no matching device was found or multithreaded probing is done; - * error code otherwise. + * -ENODEV if the device is not registered. * * When called for a USB interface, @dev->parent->sem must be held. */ @@ -246,6 +246,10 @@ int device_attach(struct device * dev) ret = device_bind_driver(dev); if (ret == 0) ret = 1; + else { + dev->driver = NULL; + ret = 0; + } } else { if (dev->bus->multithread_probe) probe_task = kthread_run(device_probe_drivers, dev, |