summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorXiaotian Feng <dfeng@redhat.com>2009-07-24 17:31:41 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-28 13:45:22 -0700
commit79f0313bfc67aa13abb931e8c12a1411f0161a68 (patch)
tree51eebd9f4d5886139849ff42df24cec4169ea343 /drivers/base
parent4df7b3e0370ab6161ea2f258f51dd7c43bef2bda (diff)
downloadop-kernel-dev-79f0313bfc67aa13abb931e8c12a1411f0161a68.zip
op-kernel-dev-79f0313bfc67aa13abb931e8c12a1411f0161a68.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 79a9ae5..0d90390 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;
}
OpenPOWER on IntegriCloud