aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/prom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index eb913f80bfb1..865b9648d0d5 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -724,7 +724,7 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
724 strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE)); 724 strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE));
725 725
726#ifdef CONFIG_CMDLINE 726#ifdef CONFIG_CMDLINE
727 if (l == 0 || (l == 1 && (*p) == 0)) 727 if (p == NULL || l == 0 || (l == 1 && (*p) == 0))
728 strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 728 strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
729#endif /* CONFIG_CMDLINE */ 729#endif /* CONFIG_CMDLINE */
730 730