Commit cb986b74 authored by Cornelia Huck's avatar Cornelia Huck Committed by Greg Kroah-Hartman

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: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c578abbc
...@@ -86,8 +86,12 @@ static void driver_sysfs_remove(struct device *dev) ...@@ -86,8 +86,12 @@ static void driver_sysfs_remove(struct device *dev)
*/ */
int device_bind_driver(struct device *dev) int device_bind_driver(struct device *dev)
{ {
int ret;
ret = driver_sysfs_add(dev);
if (!ret)
driver_bound(dev); driver_bound(dev);
return driver_sysfs_add(dev); return ret;
} }
struct stupid_thread_structure { struct stupid_thread_structure {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment