patch-2.4.10 linux/drivers/net/net_init.c
Next file: linux/drivers/net/ni5010.c
Previous file: linux/drivers/net/ncr885e.h
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Fri Sep 7 16:18:50 2001
- Orig file:
v2.4.9/linux/drivers/net/net_init.c
- Orig date:
Wed Jul 25 17:10:21 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/net/net_init.c linux/drivers/net/net_init.c
@@ -165,9 +165,16 @@
setup(dev);
if (new_device) {
+ int err;
+
rtnl_lock();
- register_netdevice(dev);
+ err = register_netdevice(dev);
rtnl_unlock();
+
+ if (err < 0) {
+ kfree(dev);
+ dev = NULL;
+ }
}
return dev;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)