patch-1.3.25 linux/drivers/net/3c505.c
Next file: linux/drivers/net/3c507.c
Previous file: linux/drivers/net/3c501.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Thu Sep 7 17:11:47 1995
- Orig file:
v1.3.24/linux/drivers/net/3c505.c
- Orig date:
Sun Sep 3 12:26:53 1995
diff -u --recursive --new-file v1.3.24/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
@@ -1257,6 +1257,8 @@
*/
adapter = (elp_device *)(dev->priv = kmalloc(sizeof(elp_device), GFP_KERNEL));
CHECK_NULL(adapter);
+ if (adapter == NULL)
+ return -ENOMEM;
memset(&(adapter->stats), 0, sizeof(struct enet_statistics));
/*
@@ -1492,6 +1494,8 @@
else
{
unregister_netdev(&dev_3c505);
+ kfree(dev_3c505.priv);
+ dev_3c505.priv = NULL;
/* If we don't do this, we can't re-insmod it later. */
release_region(dev_3c505.base_addr, ELP_IO_EXTENT);
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this