projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4df7b3e
)
driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails
author
Xiaotian Feng
<dfeng@redhat.com>
Fri, 24 Jul 2009 09:31:41 +0000
(17:31 +0800)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 28 Jul 2009 20:45:22 +0000
(13:45 -0700)
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>
drivers/base/sys.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/sys.c
b/drivers/base/sys.c
index 79a9ae5238acc1b9fa06a2fed1ed70d2440a9416..0d903909af7e5366126baaa049d35c5ea26fe6b5 100644
(file)
--- 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;
}