summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Lammerts <linux-arm@lists.lammerts.org>2009-05-19 20:53:20 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-06-03 11:51:05 +0200
commite76afc4e7816a0a5300073098cdac93a994eb5ca (patch)
tree6ab016b8b17e303246d597df2d12d7d60f8cad19
parent9fa7eb283c5cdc2b0f4a8cfe6387ed82e5e9a3d3 (diff)
downloadop-kernel-dev-e76afc4e7816a0a5300073098cdac93a994eb5ca.zip
op-kernel-dev-e76afc4e7816a0a5300073098cdac93a994eb5ca.tar.gz
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 9f460b1..5f0be40 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);
OpenPOWER on IntegriCloud