From: Geert Uytterhoeven Date: Sun, 18 Mar 2012 12:21:38 +0000 (+0100) Subject: m68k/mac: Add missing platform check before registering platform devices X-Git-Tag: MMI-PSA29.97-13-9~17073^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6cfeba53911d6d2f17ebbd1246893557d5ff5aeb;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git m68k/mac: Add missing platform check before registering platform devices 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 Cc: stable@vger.kernel.org --- diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 96fa6ed7e799..d9f62e0f46c0 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -980,6 +980,9 @@ int __init mac_platform_init(void) { u8 *swim_base; + if (!MACH_IS_MAC) + return -ENODEV; + /* * Serial devices */