patch-1.3.76 linux/drivers/net/eexpress.c

Next file: linux/drivers/scsi/scsi.c
Previous file: linux/drivers/char/ftape/kernel-interface.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.75/linux/drivers/net/eexpress.c linux/drivers/net/eexpress.c
@@ -730,10 +730,13 @@
 		outb(0,ioaddr+SET_IRQ);
 	}
 
-	eexp_hw_ASICrst(dev);
-
 	dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL);
+	if (!dev->priv) 
+		return -ENOMEM;
+
 	memset(dev->priv, 0, sizeof(struct net_local));
+
+	eexp_hw_ASICrst(dev);
 
 	{
 		unsigned short i586mso = 0x023e;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this