aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kobject.c')
-rw-r--r--lib/kobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index db1d23707eb1..eb251aae78dd 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -174,6 +174,7 @@ int kobject_shadow_add(struct kobject * kobj, struct dentry *shadow_parent)
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 kobject_put(kobj);
177 return -EINVAL; 178 return -EINVAL;
178 } 179 }
179 parent = kobject_get(kobj->parent); 180 parent = kobject_get(kobj->parent);