Geert Uytterhoeven dc1dc2f8a5 TTY: pmac_zilog, check existence of ports in pmz_console_init()
When booting a multi-platform m68k kernel on a non-Mac with "console=ttyS0"
on the kernel command line, it crashes with:

Unable to handle kernel NULL pointer dereference at virtual address   (null)
Oops: 00000000
PC: [<0013ad28>] __pmz_startup+0x32/0x2a0
...
Call Trace: [<002c5d3e>] pmz_console_setup+0x64/0xe4

The normal tty driver doesn't crash, because init_pmz() checks
pmz_ports_count again after calling pmz_probe().

In the serial console initialization path, pmz_console_init() doesn't do
this, causing the driver to crash later.

Add a check for pmz_ports_count to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 08:54:25 -08:00
..
2013-03-18 16:17:20 -07:00
2013-01-15 22:30:15 -08:00
2013-09-06 13:26:27 -07:00
2013-09-06 13:26:27 -07:00
2013-10-16 13:08:16 -07:00
2013-03-18 16:26:33 -07:00
2013-03-18 16:26:33 -07:00
2013-01-15 22:30:15 -08:00
2013-11-07 12:17:06 +09:00
2013-01-15 22:30:15 -08:00
2013-10-16 13:08:16 -07:00
2013-10-16 13:08:16 -07:00
2013-07-31 17:56:15 -07:00
2013-10-29 16:34:11 -07:00
2011-08-26 11:01:15 -07:00
2013-07-31 17:56:15 -07:00
2013-01-15 22:30:15 -08:00
2013-10-31 09:03:20 -07:00
2013-08-12 11:10:16 -07:00
2013-07-31 17:56:15 -07:00
2013-01-15 22:30:15 -08:00
2013-10-16 13:08:16 -07:00
2013-10-16 13:08:16 -07:00
2013-10-16 13:08:16 -07:00
2013-07-31 17:56:15 -07:00
2013-01-15 22:30:15 -08:00