patch-2.4.0-test12 linux/drivers/net/ethertap.c
Next file: linux/drivers/net/ewrk3.c
Previous file: linux/drivers/net/eth16i.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Mon Dec 11 13:38:29 2000
- Orig file:
v2.4.0-test11/linux/drivers/net/ethertap.c
- Orig date:
Thu May 4 11:31:21 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/net/ethertap.c linux/drivers/net/ethertap.c
@@ -67,6 +67,8 @@
int __init ethertap_probe(struct net_device *dev)
{
+ SET_MODULE_OWNER(dev);
+
memcpy(dev->dev_addr, "\xFE\xFD\x00\x00\x00\x00", 6);
if (dev->mem_start & 0xf)
ethertap_debug = dev->mem_start & 0x7;
@@ -116,13 +118,9 @@
if (ethertap_debug > 2)
printk("%s: Doing ethertap_open()...", dev->name);
- MOD_INC_USE_COUNT;
-
lp->nl = netlink_kernel_create(dev->base_addr, ethertap_rx);
- if (lp->nl == NULL) {
- MOD_DEC_USE_COUNT;
+ if (lp->nl == NULL)
return -ENOBUFS;
- }
netif_start_queue(dev);
return 0;
}
@@ -324,7 +322,6 @@
sock_release(sk->socket);
}
- MOD_DEC_USE_COUNT;
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)