Commit 0a0250bb authored by Tejun Heo's avatar Tejun Heo Committed by Greg Kroah-Hartman

[PATCH] driver-model: kobject_add() error path reference counting fix

 df_04_kobject_add_ref_fix.patch

In kobject_add(), @kobj wasn't put'd properly on error path.  This
patch fixes it.
Signed-off-by: default avatarTejun Heo <tj@home-tj.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 9522144b
......@@ -183,6 +183,7 @@ int kobject_add(struct kobject * kobj)
unlink(kobj);
if (parent)
kobject_put(parent);
kobject_put(kobj);
} else {
kobject_hotplug(kobj, KOBJ_ADD);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment