Commit b067db49e1f4013ef02ef68845701b600e88a722

Authored by Mariusz Kozlowski
Committed by Greg Kroah-Hartman
1 parent f750653670

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>

Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff

... ... @@ -195,8 +195,7 @@
195 195 if (error) {
196 196 /* unlink does the kobject_put() for us */
197 197 unlink(kobj);
198   - if (parent)
199   - kobject_put(parent);
  198 + kobject_put(parent);
200 199  
201 200 /* be noisy on error issues */
202 201 if (error == -EEXIST)
... ... @@ -420,8 +419,7 @@
420 419 t->release(kobj);
421 420 if (s)
422 421 kset_put(s);
423   - if (parent)
424   - kobject_put(parent);
  422 + kobject_put(parent);
425 423 }
426 424  
427 425 static void kobject_release(struct kref *kref)