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