[PATCH] serial: 8250: fix a sparse warning

From: Zhang Zhen
Date: Mon Mar 09 2015 - 03:45:44 EST


drivers/tty/serial/8250/8250_core.c: In function âserial8250_console_writeâ:
drivers/tty/serial/8250/8250_core.c:3244: warning: âflagsâ may be used u
unitialized in this function

Signed-off-by: Zhang Zhen <zhenzhang.zhang@xxxxxxxxxx>
---
drivers/tty/serial/8250/8250_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index deae122..50702e2 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -3241,7 +3241,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
{
struct uart_8250_port *up = &serial8250_ports[co->index];
struct uart_port *port = &up->port;
- unsigned long flags;
+ unsigned long flags = 0;
unsigned int ier;
int locked = 1;

--
1.8.5.5


.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/