Skip to contentSkip to conversation

net #7

PATCH New Andrzej Krzysztofowicz 1 participant 1 message May 30, 2001 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net #7

The following patch validates smc9194 module parameter (needed for array access)

Andrzej

*********************** PATCH 7 *****************************************

drivers/net/smc9194.c +3 -1
diff -uNr linux-2.4.5-ac4/drivers/net/smc9194.c linux/drivers/net/smc9194.c
@@ -1581,7 +1581,9 @@
 	/* copy the parameters from insmod into the device structure */
 	devSMC9194.base_addr = io;
 	devSMC9194.irq       = irq;
-	devSMC9194.if_port	= ifport;
+	devSMC9194.if_port	= 
+		(ifport >= 0 && ifport <= sizeof(interfaces)/sizeof(*interfaces)) ?
+		ifport : 0;
 	devSMC9194.init   	= smc_init;
 	if ((result = register_netdev(&devSMC9194)) != 0)
 		return result;
Signature · 4 lines
=======================================================================
  Andrzej M. Krzysztofowicz               [email protected]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk