projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9f514e
)
m68k/mac: Add missing platform check before registering platform devices
author
Geert Uytterhoeven
<geert@linux-m68k.org>
Sun, 18 Mar 2012 12:21:38 +0000
(13:21 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 15:14:06 +0000
(08:14 -0700)
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>
arch/m68k/mac/config.c
patch
|
blob
|
history
diff --git
a/arch/m68k/mac/config.c
b/arch/m68k/mac/config.c
index c247de02bc7e2fe0c49cc09522f75b9f4d0b3a67..1918d76aa06bc690f2e6993cde61fd97c67fc921 100644
(file)
--- 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
*/