patch-2.3.10 linux/drivers/net/lance.c
Next file: linux/drivers/net/lne390.c
Previous file: linux/drivers/net/irda/w83977af_ir.c
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Tue Jul  6 19:05:49 1999
-  Orig file: 
v2.3.9/linux/drivers/net/lance.c
-  Orig date: 
Mon Dec 28 11:05:14 1998
diff -u --recursive --new-file v2.3.9/linux/drivers/net/lance.c linux/drivers/net/lance.c
@@ -420,7 +420,7 @@
 	return -ENODEV;
 }
 
-__initfunc(int lance_probe1(struct device *dev, int ioaddr, int irq, int options))
+int __init lance_probe1(struct device *dev, int ioaddr, int irq, int options)
 {
 	struct lance_private *lp;
 	short dma_channels;					/* Mark spuriously-busy DMA channels */
@@ -499,6 +499,8 @@
 		
 	lp = (struct lance_private *)(((unsigned long)kmalloc(sizeof(*lp)+7,
 										   GFP_DMA | GFP_KERNEL)+7) & ~7);
+	if(lp==NULL)
+		return -ENODEV;
 	if (lance_debug > 6) printk(" (#0x%05lx)", (unsigned long)lp);
 	memset(lp, 0, sizeof(*lp));
 	dev->priv = lp;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)