X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=lib%2Fkobject.c;h=e07ee1fcd6f19da086439ffbeacd8376e4b3e533;hb=e6f0f4546a2027fc6bdb9223e5f3fde431587f5d;hp=aeefa8bc8b1c2dac1493703ff2f209ce894938f9;hpb=d85d135d8babbc917b370f36cbc02b7b4a2f2d99;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.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