Skip to content

Commit

Permalink
m68k/mac: Add missing platform check before registering platform devices
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Geert Uytterhoeven committed Apr 1, 2012
1 parent 7224c0d commit 6cfeba5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/m68k/mac/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,9 @@ int __init mac_platform_init(void)
{
u8 *swim_base;

if (!MACH_IS_MAC)
return -ENODEV;

/*
* Serial devices
*/
Expand Down

0 comments on commit 6cfeba5

Please sign in to comment.