浏览代码

altera_uart: Don't use plain integer as NULL pointer

Fixes sparse warning.

Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Anton Vorontsov 14 年之前
父节点
当前提交
70eebd0b60
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/serial/altera_uart.c

+ 1 - 1
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)