diff options
Diffstat (limited to 'drivers/serial/amba-pl010.c')
| -rw-r--r-- | drivers/serial/amba-pl010.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 61db6973755a..f69bd097166e 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
| @@ -589,6 +589,8 @@ static int __init pl010_console_setup(struct console *co, char *options) | |||
| 589 | */ | 589 | */ |
| 590 | if (co->index >= UART_NR) | 590 | if (co->index >= UART_NR) |
| 591 | co->index = 0; | 591 | co->index = 0; |
| 592 | if (!amba_ports[co->index]) | ||
| 593 | return -ENODEV; | ||
| 592 | port = &amba_ports[co->index]->port; | 594 | port = &amba_ports[co->index]->port; |
| 593 | 595 | ||
| 594 | if (options) | 596 | if (options) |
