summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/kobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index bd732ffebc85..fbf0ae282376 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -223,8 +223,7 @@ static int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
return -ENOMEM;
/* ewww... some of these buggers have '/' in the name ... */
- s = strchr(kobj->name, '/');
- if (s)
+ while ((s = strchr(kobj->name, '/')))
s[0] = '!';
kfree(old_name);