diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-28 08:29:59 -0400 |
commit | 185a257f2f73bcd89050ad02da5bedbc28fc43fa (patch) | |
tree | 5e32586114534ed3f2165614cba3d578f5d87307 /lib/kobject.c | |
parent | 3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699 (diff) | |
parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) |
Merge branch 'master' into gfs2
Diffstat (limited to 'lib/kobject.c')
-rw-r--r-- | lib/kobject.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index 8e7c71993487..1699eb9161f3 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -407,6 +407,7 @@ static struct kobj_type dir_ktype = { | |||
407 | struct kobject *kobject_add_dir(struct kobject *parent, const char *name) | 407 | struct kobject *kobject_add_dir(struct kobject *parent, const char *name) |
408 | { | 408 | { |
409 | struct kobject *k; | 409 | struct kobject *k; |
410 | int ret; | ||
410 | 411 | ||
411 | if (!parent) | 412 | if (!parent) |
412 | return NULL; | 413 | return NULL; |
@@ -418,7 +419,13 @@ struct kobject *kobject_add_dir(struct kobject *parent, const char *name) | |||
418 | k->parent = parent; | 419 | k->parent = parent; |
419 | k->ktype = &dir_ktype; | 420 | k->ktype = &dir_ktype; |
420 | kobject_set_name(k, name); | 421 | kobject_set_name(k, name); |
421 | kobject_register(k); | 422 | ret = kobject_register(k); |
423 | if (ret < 0) { | ||
424 | printk(KERN_WARNING "kobject_add_dir: " | ||
425 | "kobject_register error: %d\n", ret); | ||
426 | kobject_del(k); | ||
427 | return NULL; | ||
428 | } | ||
422 | 429 | ||
423 | return k; | 430 | return k; |
424 | } | 431 | } |