aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-01-02 07:44:44 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 13:37:13 -0500
commitb067db49e1f4013ef02ef68845701b600e88a722 (patch)
tree9b12ce952fada146afdfb638d72bf12af78aebfc /lib
parentf75065367077bd3b77842a5aa523ecd05d33e82d (diff)
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')
-rw-r--r--lib/kobject.c6
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)
195 if (error) { 195 if (error) {
196 /* unlink does the kobject_put() for us */ 196 /* unlink does the kobject_put() for us */
197 unlink(kobj); 197 unlink(kobj);
198 if (parent) 198 kobject_put(parent);
199 kobject_put(parent);
200 199
201 /* be noisy on error issues */ 200 /* be noisy on error issues */
202 if (error == -EEXIST) 201 if (error == -EEXIST)
@@ -420,8 +419,7 @@ void kobject_cleanup(struct kobject * kobj)
420 t->release(kobj); 419 t->release(kobj);
421 if (s) 420 if (s)
422 kset_put(s); 421 kset_put(s);
423 if (parent) 422 kobject_put(parent);
424 kobject_put(parent);
425} 423}
426 424
427static void kobject_release(struct kref *kref) 425static void kobject_release(struct kref *kref)