From 70eebd0b604989705f46697814e48fb4ea1d1bb9 Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Fri, 1 Oct 2010 17:23:13 +0400 Subject: [PATCH] altera_uart: Don't use plain integer as NULL pointer Fixes sparse warning. Signed-off-by: Anton Vorontsov Cc: Alan Cox Acked-by: Tobias Klauser --- drivers/serial/altera_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index dfc1ecc..7212162 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -461,7 +461,7 @@ static int __init altera_uart_console_setup(struct console *co, char *options) if (co->index < 0 || co->index >= CONFIG_SERIAL_ALTERA_UART_MAXPORTS) return -EINVAL; port = &altera_uart_ports[co->index].port; - if (port->membase == 0) + if (!port->membase) return -ENODEV; if (options) -- 2.7.4