From 4ec42917d7296e0d564d06d22bd592847d73cd22 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sun, 18 Mar 2012 13:21:38 +0100 Subject: [PATCH] m68k/mac: Add missing platform check before registering platform devices BugLink: http://bugs.launchpad.net/bugs/981162 commit 6cfeba53911d6d2f17ebbd1246893557d5ff5aeb upstream. On multi-platform kernels, the Mac platform devices should be registered when running on Mac only. Else it may crash later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman Signed-off-by: Leann Ogasawara Signed-off-by: Tim Gardner --- arch/m68k/mac/config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index c247de0..1918d76 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -950,6 +950,9 @@ int __init mac_platform_init(void) { u8 *swim_base; + if (!MACH_IS_MAC) + return -ENODEV; + /* * Serial devices */ -- 1.7.10.4