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: https://git.stricted.de/?a=commitdiff_plain;h=0003b795c310da83501fcf0329f6be7a0984647d;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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);