Skip to content

Commit

Permalink
arch/unicore32/kernel/early_printk.c:setup_early_printk: missing init…
Browse files Browse the repository at this point in the history
…ialization

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]>
  • Loading branch information
xypron authored and torvalds committed Jan 28, 2014
1 parent add688f commit 40e05dd
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions arch/unicore32/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 40e05dd

Please sign in to comment.