From 136debf707d2b3cd8e74d0fff8e29d11a78bf5c2 Mon Sep 17 00:00:00 2001 From: Thomas Betker Date: Wed, 11 Mar 2015 22:39:28 +0100 Subject: serial: xuartps: Fix check in console_setup(). cdns_uart_console_setup() checks port->mapbase != 0, but the port may not be initialized yet even if this condition is met [e.g., ioremap() may have failed]. Check port->membase != NULL instead, similar to cdns_early_console_setup(). Signed-off-by: Thomas Betker Reviewed-by: Michal Simek Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/tty') diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 556062a438cf..f218ec658f5d 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1155,7 +1155,7 @@ static int __init cdns_uart_console_setup(struct console *co, char *options) if (co->index < 0 || co->index >= CDNS_UART_NR_PORTS) return -EINVAL; - if (!port->mapbase) { + if (!port->membase) { pr_debug("console on " CDNS_UART_TTY_NAME "%i not present\n", co->index); return -ENODEV; -- cgit v1.2.3-59-g8ed1b