patch-1.3.25 linux/net/netrom/nr_dev.c

Next file: linux/CREDITS
Previous file: linux/net/ipv4/tcp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.24/linux/net/netrom/nr_dev.c linux/net/netrom/nr_dev.c
@@ -228,6 +228,8 @@
 	dev->pa_alen		= sizeof(unsigned long);
 
 	dev->priv = kmalloc(sizeof(struct enet_statistics), GFP_KERNEL);
+	if (dev->priv == NULL)
+		return -ENOMEM;
 
 	memset(dev->priv, 0, sizeof(struct enet_statistics));
 


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