summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorXiaotian Feng <dfeng@redhat.com>2009-07-24 11:31:41 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-28 22:45:22 +0200
commit79f0313bfc67aa13abb931e8c12a1411f0161a68 (patch)
tree51eebd9f4d5886139849ff42df24cec4169ea343 /drivers
parentDynamic debug: fix typo: -/-> (diff)
downloadlinux-79f0313bfc67aa13abb931e8c12a1411f0161a68.tar.xz
linux-79f0313bfc67aa13abb931e8c12a1411f0161a68.zip
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')
-rw-r--r--drivers/base/sys.c2
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;
}