X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=lib%2Fkobject.c;h=e07ee1fcd6f19da086439ffbeacd8376e4b3e533;hb=4a484cffc5e1836114e9556f7c704412d491200c;hp=aeefa8bc8b1c2dac1493703ff2f209ce894938f9;hpb=28f8571e1e84782244cc7bf1b129baf6cdc0832e;p=~andy%2Flinux diff --git a/lib/kobject.c b/lib/kobject.c index aeefa8bc8b1..e07ee1fcd6f 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; } @@ -634,7 +632,7 @@ struct kobject *kobject_create(void) /** * kobject_create_and_add - create a struct kobject dynamically and register it with sysfs * - * @name: the name for the kset + * @name: the name for the kobject * @parent: the parent kobject of this kobject, if any. * * This function creates a kobject structure dynamically and registers it