Skip to content

Commit

Permalink
TTY: amiserial, add missing platform check
Browse files Browse the repository at this point in the history
When booting a multi-platform m68k kernel on a non-Amiga with
"console=ttyS0" on the kernel command line, it crashes with:

Unable to handle kernel access at virtual address 81dff01c
Oops: 00000000
PC: [<001e09a8>] serial_console_write+0xc/0x70

Add the missing platform check to amiserial_console_init() to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Greg Kroah-Hartman committed Nov 25, 2013
1 parent dc1dc2f commit 3dcf344
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/tty/amiserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1855,6 +1855,9 @@ static struct console sercons = {
*/
static int __init amiserial_console_init(void)
{
if (!MACH_IS_AMIGA)
return -ENODEV;

register_console(&sercons);
return 0;
}
Expand Down

0 comments on commit 3dcf344

Please sign in to comment.