aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kobject.c')
-rw-r--r--lib/kobject.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index ac1520651b9b..b4ebd7631700 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -597,10 +597,17 @@ int kset_add(struct kset * k)
597 597
598int kset_register(struct kset * k) 598int kset_register(struct kset * k)
599{ 599{
600 int err;
601
600 if (!k) 602 if (!k)
601 return -EINVAL; 603 return -EINVAL;
604
602 kset_init(k); 605 kset_init(k);
603 return kset_add(k); 606 err = kset_add(k);
607 if (err)
608 return err;
609 kobject_uevent(&k->kobj, KOBJ_ADD);
610 return 0;
604} 611}
605 612
606 613