summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/params.c2
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)
* don't need to; this mangled commandline is preserved. */
if (slab_is_available()) {
*(char **)kp->arg = kstrdup(val, GFP_KERNEL);
- if (!kp->arg)
+ if (!*(char **)kp->arg)
return -ENOMEM;
} else
*(const char **)kp->arg = val;