Merge branches 'bugfix-battery', 'bugfix-misc', 'bugfix-rafael', 'bugfix-turbostat...
[pandora-kernel.git] / lib / kobject.c
index aeefa8b..e07ee1f 100644 (file)
@@ -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