mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00: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 <dfeng@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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