diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-03-18 13:21:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-13 09:13:52 -0700 |
commit | d89e8755daca2a1e2b1608d0a0dfc3d5990bb50e (patch) | |
tree | 442afe686824c2af01466bfeef29dc02671f9dd9 /arch | |
parent | adf679a9a0e7d19a0e0b8ff020896e43d26af687 (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index f60ff5f59205..da3b8d8ac45c 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 */ |