diff --git a/mm/percpu.c b/mm/percpu.c
index ec2589616e7d122cf097175bf0597b6fa21e9626..8c8e08f3a692ecf614fabd537aa9dc4e00f42b21 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1380,6 +1380,9 @@ enum pcpu_fc pcpu_chosen_fc __initdata = PCPU_FC_AUTO;
 
 static int __init percpu_alloc_setup(char *str)
 {
+	if (!str)
+		return -EINVAL;
+
 	if (0)
 		/* nada */;
 #ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK