diff options
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r-- | lib/kobject_uevent.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index 4122f38330d4..d9a3510ed2e2 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -95,10 +95,8 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
95 | 95 | ||
96 | /* search the kset we belong to */ | 96 | /* search the kset we belong to */ |
97 | top_kobj = kobj; | 97 | top_kobj = kobj; |
98 | if (!top_kobj->kset && top_kobj->parent) { | 98 | while (!top_kobj->kset && top_kobj->parent) { |
99 | do { | 99 | top_kobj = top_kobj->parent; |
100 | top_kobj = top_kobj->parent; | ||
101 | } while (!top_kobj->kset && top_kobj->parent); | ||
102 | } | 100 | } |
103 | if (!top_kobj->kset) { | 101 | if (!top_kobj->kset) { |
104 | pr_debug("kobject attempted to send uevent without kset!\n"); | 102 | pr_debug("kobject attempted to send uevent without kset!\n"); |