提交 40e05dd0 编写于 作者: H Heinrich Schuchardt 提交者: Linus Torvalds

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: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 add688fb
...@@ -35,17 +35,11 @@ static struct console early_ocd_console = { ...@@ -35,17 +35,11 @@ static struct console early_ocd_console = {
static int __init setup_early_printk(char *buf) static int __init setup_early_printk(char *buf)
{ {
int keep_early;
if (!buf || early_console) if (!buf || early_console)
return 0; return 0;
if (strstr(buf, "keep"))
keep_early = 1;
early_console = &early_ocd_console; early_console = &early_ocd_console;
if (strstr(buf, "keep"))
if (keep_early)
early_console->flags &= ~CON_BOOT; early_console->flags &= ~CON_BOOT;
else else
early_console->flags |= CON_BOOT; early_console->flags |= CON_BOOT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册