summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2012-03-18 13:21:38 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-13 08:33:47 -0700
commit3f2d237ff6379e5dd552e9cdb7c2662c0ea89cc8 (patch)
treea1fe1434546056a9291e8203aea7a9fa89e1b369 /arch
parent7be29c2aabb07d7964600f2ffda281a349642efe (diff)
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 <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/m68k/mac/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index c247de02bc7e..1918d76aa06b 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
*/