m68k: Some network drivers do not check the platform
Some network drivers do not check whether they're actually running on the correct platform, causing multi-platform kernels to crash if they are not. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
d649770087
commit
0f734484ac
@@ -183,6 +183,9 @@ struct net_device * __init mac89x0_probe(int unit)
|
||||
int err = -ENODEV;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (!MACH_IS_MAC)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
dev = alloc_etherdev(sizeof(struct net_local));
|
||||
if (!dev)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
Reference in New Issue
Block a user