diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-03-18 08:21:38 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-04-01 16:57:51 -0400 |
commit | 6cfeba53911d6d2f17ebbd1246893557d5ff5aeb (patch) | |
tree | ec74c829f11b9fe5b4fa5c35cffd61f83454ad22 | |
parent | 7224c0d1045327d637dab2c90777b6d5ec6d6804 (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
-rw-r--r-- | arch/m68k/mac/config.c | 3 |
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) | |||
980 | { | 980 | { |
981 | u8 *swim_base; | 981 | u8 *swim_base; |
982 | 982 | ||
983 | if (!MACH_IS_MAC) | ||
984 | return -ENODEV; | ||
985 | |||
983 | /* | 986 | /* |
984 | * Serial devices | 987 | * Serial devices |
985 | */ | 988 | */ |