serial: sh-sci: prevent setup of uninitialized serial console
authorAlexandre Courbot <gnurou@gmail.com>
Wed, 9 Feb 2011 03:18:46 +0000 (03:18 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 31 Mar 2011 05:33:22 +0000 (14:33 +0900)
Commit 906b17dc089f7fa87e37a9cfe6ee185efc90e0da introduced a condition
where the kernel will crash unless a earlyprintk parameter is specified.

Without this parameter, sci_console_init is called during early console
setup without any port being initialized, and the kernel crashes a
little bit later when uart_set_options attemps to invoke set_termios on a
port with an ops member equal to NULL.

This patch just checks in sci_console_init that the port is properly
initialized, and aborts the early console setup if it is not.

Signed-off-by: Alexandre Courbot <gnurou@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

No differences found