summaryrefslogtreecommitdiffstats
path: root/drivers/serial/imx.c
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-06-03 11:51:05 +0200
commite76afc4e7816a0a5300073098cdac93a994eb5ca (patch)
tree6ab016b8b17e303246d597df2d12d7d60f8cad19 /drivers/serial/imx.c
parentLinux 2.6.30-rc8 (diff)
downloadlinux-e76afc4e7816a0a5300073098cdac93a994eb5ca.tar.xz
linux-e76afc4e7816a0a5300073098cdac93a994eb5ca.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>
Diffstat (limited to 'drivers/serial/imx.c')
-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 9f460b175c50..5f0be40dfdab 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1031,6 +1031,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);