aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/kobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index 2782f49e906e..f4f6176dcd12 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -171,7 +171,7 @@ int kobject_shadow_add(struct kobject * kobj, struct dentry *shadow_parent)
171 return -ENOENT; 171 return -ENOENT;
172 if (!kobj->k_name) 172 if (!kobj->k_name)
173 kobj->k_name = kobj->name; 173 kobj->k_name = kobj->name;
174 if (!kobj->k_name) { 174 if (!*kobj->k_name) {
175 pr_debug("kobject attempted to be registered with no name!\n"); 175 pr_debug("kobject attempted to be registered with no name!\n");
176 WARN_ON(1); 176 WARN_ON(1);
177 return -EINVAL; 177 return -EINVAL;
@@ -326,6 +326,7 @@ int kobject_rename(struct kobject * kobj, const char *new_name)
326/** 326/**
327 * kobject_rename - change the name of an object 327 * kobject_rename - change the name of an object
328 * @kobj: object in question. 328 * @kobj: object in question.
329 * @new_parent: object's new parent
329 * @new_name: object's new name 330 * @new_name: object's new name
330 */ 331 */
331 332