diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-01-02 15:44:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 21:37:13 +0300 |
commit | b067db49e1f4013ef02ef68845701b600e88a722 (patch) | |
tree | 9b12ce952fada146afdfb638d72bf12af78aebfc /lib/kobject.c | |
parent | f75065367077bd3b77842a5aa523ecd05d33e82d (diff) | |
download | linux-b067db49e1f4013ef02ef68845701b600e88a722.tar.xz |
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>
Diffstat (limited to 'lib/kobject.c')
-rw-r--r-- | lib/kobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index c033dc8fa9af..74b8dbca150e 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -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) |