summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Lammerts <linux-arm@lists.lammerts.org>2009-05-20 02:53:20 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2009-05-20 19:09:20 +0200
commit0003b795c310da83501fcf0329f6be7a0984647d (patch)
tree567e050f3c19abd75f333b03a17bfc71b9ab323e
parenti.MX31: Add support for LAN9217 on PDK debug board. (diff)
downloadlinux-0003b795c310da83501fcf0329f6be7a0984647d.tar.xz
linux-0003b795c310da83501fcf0329f6be7a0984647d.zip
fix oops when using console=ttymxcN with N > 0
Signed-off-by: Eric Lammerts <eric@lammerts.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/serial/imx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 3f5d5a200481..738c8a5f64f2 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1024,6 +1024,8 @@ imx_console_setup(struct console *co, char *options)
if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports))
co->index = 0;
sport = imx_ports[co->index];
+ if(sport == NULL)
+ return -ENODEV;
if (options)
uart_parse_options(options, &baud, &parity, &bits, &flow);