From 40e05dd026c27d7ed2493d196705492338d449a9 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 27 Jan 2014 17:06:54 -0800 Subject: arch/unicore32/kernel/early_printk.c:setup_early_printk: missing initialization It is based on uninitialized value keep_early. This leads to unpredictable result. [akpm@linux-foundation.org: simplify code] Signed-off-by: Heinrich Schuchardt Cc: Guan Xuetao Cc: Paul Gortmaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/unicore32/kernel/early_printk.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'arch/unicore32') diff --git a/arch/unicore32/kernel/early_printk.c b/arch/unicore32/kernel/early_printk.c index 9be0d5d02a9a..f2f6323c8d64 100644 --- a/arch/unicore32/kernel/early_printk.c +++ b/arch/unicore32/kernel/early_printk.c @@ -35,17 +35,11 @@ static struct console early_ocd_console = { static int __init setup_early_printk(char *buf) { - int keep_early; - if (!buf || early_console) return 0; - if (strstr(buf, "keep")) - keep_early = 1; - early_console = &early_ocd_console; - - if (keep_early) + if (strstr(buf, "keep")) early_console->flags &= ~CON_BOOT; else early_console->flags |= CON_BOOT; -- cgit v1.2.1