提交 b067db49 编写于 作者: M Mariusz Kozlowski 提交者: Greg Kroah-Hartman

kobject: kobject_put cleanup

This patch removes redundant argument checks for kobject_put().
Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f7506536
......@@ -195,8 +195,7 @@ int kobject_add(struct kobject * kobj)
if (error) {
/* unlink does the kobject_put() for us */
unlink(kobj);
if (parent)
kobject_put(parent);
kobject_put(parent);
/* be noisy on error issues */
if (error == -EEXIST)
......@@ -420,8 +419,7 @@ void kobject_cleanup(struct kobject * kobj)
t->release(kobj);
if (s)
kset_put(s);
if (parent)
kobject_put(parent);
kobject_put(parent);
}
static void kobject_release(struct kref *kref)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册