Subject: [PATCH] m68k: sun3lance doesn't check for Sun3/Sun3x From: Geert Uytterhoeven The Sun3 LANCE network driver (sun3lance) doesn't check whether it's actually running on Sun3 or Sun3x hardware, causing a crash if it isn't. Signed-off-by: Geert Uytterhoeven --- drivers/net/sun3lance.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c @@ -250,6 +250,9 @@ struct net_device * __init sun3lance_pro static int found; int err = -ENODEV; + if (!MACH_IS_SUN3 && !MACH_IS_SUN3X) + return ERR_PTR(-ENODEV); + /* check that this machine has an onboard lance */ switch(idprom->id_machtype) { case SM_SUN3|SM_3_50: