From 8f57eb3b08f48605a63758880d4e3fbb60592a8b Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 22 Jan 2007 18:59:42 +0000 Subject: [PATCH] --- yaml --- r: 45926 b: refs/heads/master c: d28122a5877cc40350fa801353fd5a9350563ec3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/serial/amba-pl010.c | 2 ++ trunk/drivers/serial/amba-pl011.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index bd6d38e9c2a7..f796329b2f8a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7f215abc69302dc027f024fe656e4841063e8fe8 +refs/heads/master: d28122a5877cc40350fa801353fd5a9350563ec3 diff --git a/trunk/drivers/serial/amba-pl010.c b/trunk/drivers/serial/amba-pl010.c index 61db6973755a..f69bd097166e 100644 --- a/trunk/drivers/serial/amba-pl010.c +++ b/trunk/drivers/serial/amba-pl010.c @@ -589,6 +589,8 @@ static int __init pl010_console_setup(struct console *co, char *options) */ if (co->index >= UART_NR) co->index = 0; + if (!amba_ports[co->index]) + return -ENODEV; port = &amba_ports[co->index]->port; if (options) diff --git a/trunk/drivers/serial/amba-pl011.c b/trunk/drivers/serial/amba-pl011.c index 9a3b374b2a08..44639e71372a 100644 --- a/trunk/drivers/serial/amba-pl011.c +++ b/trunk/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);