patch-2.4.0-test2 linux/drivers/net/tulip/eeprom.c

Next file: linux/drivers/net/tulip/interrupt.c
Previous file: linux/drivers/net/tulip/21142.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/net/tulip/eeprom.c linux/drivers/net/tulip/eeprom.c
@@ -162,6 +162,13 @@
 		if (tp->flags & CSR12_IN_SROM)
 			csr12dir = *p++;
 		count = *p++;
+
+	        /* there is no phy information, don't even try to build mtable */
+	        if (count == 0) {
+			DPRINTK("no phy info, aborting mtable build\n");
+		        return;
+		}
+
 		mtable = (struct mediatable *)
 			kmalloc(sizeof(struct mediatable) + count*sizeof(struct medialeaf),
 					GFP_KERNEL);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)