diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index 21dee7c19afd..bbffa2110d43 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -47,13 +47,11 @@ static int populate_dir(struct kobject *kobj) static int create_dir(struct kobject *kobj) { int error = 0; - if (kobject_name(kobj)) { - error = sysfs_create_dir(kobj); - if (!error) { - error = populate_dir(kobj); - if (error) - sysfs_remove_dir(kobj); - } + error = sysfs_create_dir(kobj); + if (!error) { + error = populate_dir(kobj); + if (error) + sysfs_remove_dir(kobj); } return error; } |