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: v3.3.2~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d89e8755daca2a1e2b1608d0a0dfc3d5990bb50e;p=thirdparty%2Fkernel%2Fstable.git m68k/mac: Add missing platform check before registering platform devices 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 --- diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index f60ff5f59205c..da3b8d8ac45cd 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -981,6 +981,9 @@ int __init mac_platform_init(void) { u8 *swim_base; + if (!MACH_IS_MAC) + return -ENODEV; + /* * Serial devices */