aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject_uevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r--lib/kobject_uevent.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 9f8d599459d1..3f914725bda8 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -285,8 +285,7 @@ int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
285 int len; 285 int len;
286 286
287 if (env->envp_idx >= ARRAY_SIZE(env->envp)) { 287 if (env->envp_idx >= ARRAY_SIZE(env->envp)) {
288 printk(KERN_ERR "add_uevent_var: too many keys\n"); 288 WARN(1, KERN_ERR "add_uevent_var: too many keys\n");
289 WARN_ON(1);
290 return -ENOMEM; 289 return -ENOMEM;
291 } 290 }
292 291
@@ -297,8 +296,7 @@ int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
297 va_end(args); 296 va_end(args);
298 297
299 if (len >= (sizeof(env->buf) - env->buflen)) { 298 if (len >= (sizeof(env->buf) - env->buflen)) {
300 printk(KERN_ERR "add_uevent_var: buffer size too small\n"); 299 WARN(1, KERN_ERR "add_uevent_var: buffer size too small\n");
301 WARN_ON(1);
302 return -ENOMEM; 300 return -ENOMEM;
303 } 301 }
304 302