kobject: kobject_put cleanup
This patch removes redundant argument checks for kobject_put(). Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f750653670
commit
b067db49e1
@@ -195,7 +195,6 @@ int kobject_add(struct kobject * kobj)
|
|||||||
if (error) {
|
if (error) {
|
||||||
/* unlink does the kobject_put() for us */
|
/* unlink does the kobject_put() for us */
|
||||||
unlink(kobj);
|
unlink(kobj);
|
||||||
if (parent)
|
|
||||||
kobject_put(parent);
|
kobject_put(parent);
|
||||||
|
|
||||||
/* be noisy on error issues */
|
/* be noisy on error issues */
|
||||||
@@ -420,7 +419,6 @@ void kobject_cleanup(struct kobject * kobj)
|
|||||||
t->release(kobj);
|
t->release(kobj);
|
||||||
if (s)
|
if (s)
|
||||||
kset_put(s);
|
kset_put(s);
|
||||||
if (parent)
|
|
||||||
kobject_put(parent);
|
kobject_put(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user