aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2006-11-27 04:35:12 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 13:37:13 -0500
commitcb986b749c7178422bfbc982cd30e04d5db54bbc (patch)
treec41118ed78a7c43868a57c045769dc90b8604b8d /drivers/base/dd.c
parentc578abbc20762aa58e390e55252959853eeea17e (diff)
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/base/dd.c')
-rw-r--r--drivers/base/dd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index f70513748947..b5bf243d9cd6 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -86,8 +86,12 @@ static void driver_sysfs_remove(struct device *dev)
86 */ 86 */
87int device_bind_driver(struct device *dev) 87int device_bind_driver(struct device *dev)
88{ 88{
89 driver_bound(dev); 89 int ret;
90 return driver_sysfs_add(dev); 90
91 ret = driver_sysfs_add(dev);
92 if (!ret)
93 driver_bound(dev);
94 return ret;
91} 95}
92 96
93struct stupid_thread_structure { 97struct stupid_thread_structure {