patch-1.3.25 linux/drivers/net/depca.c

Next file: linux/drivers/net/dummy.c
Previous file: linux/drivers/net/de4x5.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.24/linux/drivers/net/depca.c linux/drivers/net/depca.c
@@ -511,6 +511,8 @@
  
 	  /* Define the device private memory */
 	  dev->priv = (void *) kmalloc(sizeof(struct depca_private), GFP_KERNEL);
+	  if (dev->priv == NULL)
+	    return -ENOMEM;
 	  lp = (struct depca_private *)dev->priv;
 	  memset((char *)dev->priv, 0, sizeof(struct depca_private));
 	  lp->adapter = adapter;

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