diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-02-18 00:15:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-18 14:05:14 -0500 |
commit | f30e826069918da0876493e2de9ba13287b68e0a (patch) | |
tree | 54cfe2e47851a241323d94be39fb4c6428ad5e29 | |
parent | c3e1becebfe115f827ea2242218c9a8f627c094f (diff) |
serial: imx: fix uninitialized variable warning
Commit 677fe55 (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: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/imx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index adf76117a733..147c9e193595 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -1211,7 +1211,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count) | |||
1211 | struct imx_port *sport = imx_ports[co->index]; | 1211 | struct imx_port *sport = imx_ports[co->index]; |
1212 | struct imx_port_ucrs old_ucr; | 1212 | struct imx_port_ucrs old_ucr; |
1213 | unsigned int ucr1; | 1213 | unsigned int ucr1; |
1214 | unsigned long flags; | 1214 | unsigned long flags = 0; |
1215 | int locked = 1; | 1215 | int locked = 1; |
1216 | 1216 | ||
1217 | if (sport->port.sysrq) | 1217 | if (sport->port.sysrq) |