mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
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>
This commit is contained in:
parent
c578abbc20
commit
cb986b749c
1 changed files with 6 additions and 2 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
driver_bound(dev);
|
int ret;
|
||||||
return driver_sysfs_add(dev);
|
|
||||||
|
ret = driver_sysfs_add(dev);
|
||||||
|
if (!ret)
|
||||||
|
driver_bound(dev);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct stupid_thread_structure {
|
struct stupid_thread_structure {
|
||||||
|
|
Loading…
Add table
Reference in a new issue