提交 f30e8260 编写于 作者: S Shawn Guo 提交者: Greg Kroah-Hartman

serial: imx: fix uninitialized variable warning

Commit 677fe555 (serial: imx: Fix recursive locking bug) introduces an
uninitialized variable warning as below.

  CC      drivers/tty/serial/imx.o
drivers/tty/serial/imx.c: In function ‘imx_console_write’:
include/linux/spinlock.h:340:2: warning: ‘flags’ may be used uninitialized in this function [-Wuninitialized]
drivers/tty/serial/imx.c:1214:16: note: ‘flags’ was declared here

Initialize the variable to suppress the warning.
Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
Acked-by: NDirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c3e1bece
......@@ -1211,7 +1211,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count)
struct imx_port *sport = imx_ports[co->index];
struct imx_port_ucrs old_ucr;
unsigned int ucr1;
unsigned long flags;
unsigned long flags = 0;
int locked = 1;
if (sport->port.sysrq)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册