Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee13...
[pandora-kernel.git] / arch / powerpc / kernel / prom.c
index eb913f8..865b964 100644 (file)
@@ -724,7 +724,7 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
                strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE));
 
 #ifdef CONFIG_CMDLINE
-       if (l == 0 || (l == 1 && (*p) == 0))
+       if (p == NULL || l == 0 || (l == 1 && (*p) == 0))
                strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
 #endif /* CONFIG_CMDLINE */