diff options
author | Xiaotian Feng <dfeng@redhat.com> | 2009-07-24 13:31:41 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-29 00:45:22 +0400 |
commit | 79f0313bfc67aa13abb931e8c12a1411f0161a68 (patch) | |
tree | 51eebd9f4d5886139849ff42df24cec4169ea343 /drivers/base | |
parent | 4df7b3e0370ab6161ea2f258f51dd7c43bef2bda (diff) | |
download | linux-79f0313bfc67aa13abb931e8c12a1411f0161a68.tar.xz |
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>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 79a9ae5238ac..0d903909af7e 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c @@ -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; } |