patch-2.4.22 linux-2.4.22/drivers/net/dgrs.c

Next file: linux-2.4.22/drivers/net/dl2k.h
Previous file: linux-2.4.22/drivers/net/cs89x0.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/drivers/net/dgrs.c linux-2.4.22/drivers/net/dgrs.c
@@ -1279,8 +1279,10 @@
 	dev->init = dgrs_probe1;
 	SET_MODULE_OWNER(dev);
 	ether_setup(dev);
-	if (register_netdev(dev) != 0)
+	if (register_netdev(dev) != 0) {
+		kfree(dev);
 		return -EIO;
+	}
 
 	priv->next_dev = dgrs_root_dev;
 	dgrs_root_dev = dev;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)