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=e76afc4e7816a0a5300073098cdac93a994eb5ca;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 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);