mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails
If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD uevent to userspace. Signed-off-by: Xiaotian Feng <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
4df7b3e037
commit
79f0313bfc
1 changed files with 1 additions and 1 deletions
|
|
@ -275,9 +275,9 @@ int sysdev_register(struct sys_device *sysdev)
|
|||
drv->add(sysdev);
|
||||
}
|
||||
mutex_unlock(&sysdev_drivers_lock);
|
||||
kobject_uevent(&sysdev->kobj, KOBJ_ADD);
|
||||
}
|
||||
|
||||
kobject_uevent(&sysdev->kobj, KOBJ_ADD);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue