diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-01-22 19:59:42 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-01-24 12:59:57 +0100 |
commit | d28122a5877cc40350fa801353fd5a9350563ec3 (patch) | |
tree | e06ed644c3fe537f35dfd87e8acebffe7f1b8e4f /drivers/serial/amba-pl011.c | |
parent | [ARM] 4100/1: iop3xx: fix cpu mask for iop333 (diff) | |
download | linux-d28122a5877cc40350fa801353fd5a9350563ec3.tar.xz linux-d28122a5877cc40350fa801353fd5a9350563ec3.zip |
[ARM] Fix AMBA serial drivers for non-first serial ports
Using console=ttyAM1 or console=ttyAMA1 resulted in an oops during
boot due to trying to drive the console before that port had been
registered. Fix this by checking whether the port is present before
allowing console setup to proceed.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/amba-pl011.c')
-rw-r--r-- | drivers/serial/amba-pl011.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 9a3b374b2a08..44639e71372a 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -661,6 +661,8 @@ static int __init pl011_console_setup(struct console *co, char *options) if (co->index >= UART_NR) co->index = 0; uap = amba_ports[co->index]; + if (!uap) + return -ENODEV; uap->port.uartclk = clk_get_rate(uap->clk); |