X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Fkobject.c;h=e07ee1fcd6f19da086439ffbeacd8376e4b3e533;hb=927ad551031798d4cba49766549600bbb33872d7;hp=aeefa8bc8b1c2dac1493703ff2f209ce894938f9;hpb=acdf2fc860f785781bb304a7f178141541f85283;p=karo-tx-linux.git diff --git a/lib/kobject.c b/lib/kobject.c index aeefa8bc8b1c..e07ee1fcd6f1 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