From: Anton Vorontsov Date: Fri, 1 Oct 2010 13:23:13 +0000 (+0400) Subject: altera_uart: Don't use plain integer as NULL pointer X-Git-Tag: v2.6.37-rc1~155^2~8 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=70eebd0b604989705f46697814e48fb4ea1d1bb9;p=linux.git 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 --- diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index dfc1ecc40abc..721216292a50 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)