From 8498a2ff8d111f3e115f0347a423c9f5ea235c6e Mon Sep 17 00:00:00 2001 From: Mariusz Kozlowski Date: Tue, 2 Jan 2007 13:44:44 +0100 Subject: [PATCH] --- yaml --- r: 46621 b: refs/heads/master c: b067db49e1f4013ef02ef68845701b600e88a722 h: refs/heads/master i: 46619: 6ea1491e85eec978e4c18b50e3b5a365c5148a07 v: v3 --- [refs] | 2 +- trunk/lib/kobject.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 9953488e7366..feff7215f46f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f75065367077bd3b77842a5aa523ecd05d33e82d +refs/heads/master: b067db49e1f4013ef02ef68845701b600e88a722 diff --git a/trunk/lib/kobject.c b/trunk/lib/kobject.c index c033dc8fa9af..74b8dbca150e 100644 --- a/trunk/lib/kobject.c +++ b/trunk/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)