diff options
-rw-r--r-- | kernel/params.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/params.c b/kernel/params.c index 95ef27cf8e82..00520c43d88c 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -222,7 +222,7 @@ int param_set_charp(const char *val, struct kernel_param *kp) | |||
222 | * don't need to; this mangled commandline is preserved. */ | 222 | * don't need to; this mangled commandline is preserved. */ |
223 | if (slab_is_available()) { | 223 | if (slab_is_available()) { |
224 | *(char **)kp->arg = kstrdup(val, GFP_KERNEL); | 224 | *(char **)kp->arg = kstrdup(val, GFP_KERNEL); |
225 | if (!kp->arg) | 225 | if (!*(char **)kp->arg) |
226 | return -ENOMEM; | 226 | return -ENOMEM; |
227 | } else | 227 | } else |
228 | *(const char **)kp->arg = val; | 228 | *(const char **)kp->arg = val; |