patch-1.3.25 linux/drivers/net/3c501.c

Next file: linux/drivers/net/3c505.c
Previous file: linux/drivers/char/scc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.24/linux/drivers/net/3c501.c linux/drivers/net/3c501.c
@@ -289,8 +289,9 @@
 	printk("%s", version);
 
     /* Initialize the device structure. */
+    dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL);
     if (dev->priv == NULL)
-	dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL);
+	return -ENOMEM;
     memset(dev->priv, 0, sizeof(struct net_local));
 
     /* The EL1-specific entries in the device structure. */

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