Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40e05dd0 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Linus Torvalds
Browse files

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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent add688fb
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -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;