]> Git Repo - linux.git/commitdiff
arch/unicore32/kernel/early_printk.c:setup_early_printk: missing initialization
authorHeinrich Schuchardt <[email protected]>
Tue, 28 Jan 2014 01:06:54 +0000 (17:06 -0800)
committerLinus Torvalds <[email protected]>
Tue, 28 Jan 2014 05:02:39 +0000 (21:02 -0800)
It is based on uninitialized value keep_early.  This leads to
unpredictable result.

[[email protected]: simplify code]
Signed-off-by: Heinrich Schuchardt <[email protected]>
Cc: Guan Xuetao <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/unicore32/kernel/early_printk.c

index 9be0d5d02a9a7681ab00cd21aa2272449336d8fa..f2f6323c8d64e4bdec2b9864a152244e5b33a8d3 100644 (file)
@@ -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;
This page took 0.059151 seconds and 4 git commands to generate.