diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-11-27 10:35:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 10:37:13 -0800 |
commit | cb986b749c7178422bfbc982cd30e04d5db54bbc (patch) | |
tree | c41118ed78a7c43868a57c045769dc90b8604b8d /drivers | |
parent | c578abbc20762aa58e390e55252959853eeea17e (diff) | |
download | kernel_samsung_aries-cb986b749c7178422bfbc982cd30e04d5db54bbc.zip kernel_samsung_aries-cb986b749c7178422bfbc982cd30e04d5db54bbc.tar.gz kernel_samsung_aries-cb986b749c7178422bfbc982cd30e04d5db54bbc.tar.bz2 |
driver core: Change function call order in device_bind_driver().
Change function call order in device_bind_driver().
If we create symlinks (which might fail) before adding the device to the list
we don't have to clean up afterwards (which we didn't).
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 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index f705137..b5bf243 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -86,8 +86,12 @@ static void driver_sysfs_remove(struct device *dev) */ int device_bind_driver(struct device *dev) { - driver_bound(dev); - return driver_sysfs_add(dev); + int ret; + + ret = driver_sysfs_add(dev); + if (!ret) + driver_bound(dev); + return ret; } struct stupid_thread_structure { |