From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20120411231309.665578998@linuxfoundation.org> Date: Wed, 11 Apr 2012 16:13:21 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Geert Uytterhoeven Subject: [ 14/42] m68k/mac: Add missing platform check before registering platform devices In-Reply-To: <20120411231443.GA808@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven 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 Signed-off-by: Greg Kroah-Hartman --- arch/m68k/mac/config.c | 3 +++ 1 file changed, 3 insertions(+) --- 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 */