lib: kobject_put cleanup
Subsystems (2)
PATCH 1/1 lib: kobject_put cleanup
Hello,
This patch removes redundant argument checks for kobject_put().
Signed-off-by Mariusz Kozlowski <[email protected]>
lib/kobject.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
lib/kobject.c +2 -4
@@ -237,8 +237,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 )
@@ -464,8 +463,7 @@ void kobject_cleanup(struct kobject * koif (s)kset_put (s); -if (parent) -kobject_put (parent); +kobject_put (parent); }static void kobject_release (struct kref *kref)
Signature · 3 lines
Regards, Mariusz Kozlowski