Skip to content

Commit 6cfeba5

Browse files
committed
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
1 parent 7224c0d commit 6cfeba5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎arch/m68k/mac/config.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,9 @@ int __init mac_platform_init(void)
980980
{
981981
u8 *swim_base;
982982

983+
if (!MACH_IS_MAC)
984+
return -ENODEV;
985+
983986
/*
984987
* Serial devices
985988
*/

0 commit comments

Comments
 (0)