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 <[email protected]>
Reviewed-by: Michal Simek <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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;