summaryrefslogtreecommitdiff
path: root/arch/m68k/mac/config.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2012-03-18 13:21:38 +0100
committerGeert Uytterhoeven <geert@linux-m68k.org>2012-04-01 22:57:51 +0200
commit6cfeba53911d6d2f17ebbd1246893557d5ff5aeb (patch)
treeec74c829f11b9fe5b4fa5c35cffd61f83454ad22 /arch/m68k/mac/config.c
parent7224c0d1045327d637dab2c90777b6d5ec6d6804 (diff)
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 <geert@linux-m68k.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'arch/m68k/mac/config.c')
-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 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
*/