mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
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
This commit is contained in:
parent
7224c0d104
commit
6cfeba5391
1 changed files with 3 additions and 0 deletions
|
@ -980,6 +980,9 @@ int __init mac_platform_init(void)
|
|||
{
|
||||
u8 *swim_base;
|
||||
|
||||
if (!MACH_IS_MAC)
|
||||
return -ENODEV;
|
||||
|
||||
/*
|
||||
* Serial devices
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue