From: Eric Lammerts Date: Wed, 20 May 2009 00:53:20 +0000 (-0400) Subject: fix oops when using console=ttymxcN with N > 0 X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=0003b795c310da83501fcf0329f6be7a0984647d;p=deliverable%2Flinux.git fix oops when using console=ttymxcN with N > 0 Signed-off-by: Eric Lammerts Signed-off-by: Sascha Hauer --- 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);