* [PATCH] drivers/base: do not send KOBJ_ADD uevent if kobject_init_and_add fails
@ 2009-07-24 9:31 Xiaotian Feng
0 siblings, 0 replies; only message in thread
From: Xiaotian Feng @ 2009-07-24 9:31 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Xiaotian Feng
If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD
uevent to userspace.
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
---
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 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;
}
--
1.6.2.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-24 9:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-24 9:31 [PATCH] drivers/base: do not send KOBJ_ADD uevent if kobject_init_and_add fails Xiaotian Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome