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 08:14:06 -0700 |
commit | 7c11d1dd6e0c348d7ff0915842720acf373aa24c (patch) | |
tree | 8781068c2983c6cc5317481a47963482c92c09f7 | |
parent | c9f514e30019562ad19044e992248ad7865b37cd (diff) | |
download | lwn-7c11d1dd6e0c348d7ff0915842720acf373aa24c.tar.gz lwn-7c11d1dd6e0c348d7ff0915842720acf373aa24c.zip |
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>
-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 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 */ |