diff options
author | Thomas Betker <thomas.betker@rohde-schwarz.com> | 2015-03-11 17:39:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 17:55:18 -0400 |
commit | 136debf707d2b3cd8e74d0fff8e29d11a78bf5c2 (patch) | |
tree | 80a1812105b2cce6df6dfcfddde5007861aff5cf /drivers/tty/serial | |
parent | 19f22efdb653642814e6c8710fca974c1dbe7cfa (diff) |
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 <thomas.betker@rohde-schwarz.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
1155 | if (co->index < 0 || co->index >= CDNS_UART_NR_PORTS) | 1155 | if (co->index < 0 || co->index >= CDNS_UART_NR_PORTS) |
1156 | return -EINVAL; | 1156 | return -EINVAL; |
1157 | 1157 | ||
1158 | if (!port->mapbase) { | 1158 | if (!port->membase) { |
1159 | pr_debug("console on " CDNS_UART_TTY_NAME "%i not present\n", | 1159 | pr_debug("console on " CDNS_UART_TTY_NAME "%i not present\n", |
1160 | co->index); | 1160 | co->index); |
1161 | return -ENODEV; | 1161 | return -ENODEV; |