Commit cf6d915d authored by Stephen Hemminger's avatar Stephen Hemminger

[NET]: free_netdev - net/* drivers.

Replace kfree with free_netdev in cleanup routines
of protocols and network pseudo drivers.
parent e3d06860
...@@ -419,7 +419,7 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb) ...@@ -419,7 +419,7 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
list_del(&brdev->br2684_devs); list_del(&brdev->br2684_devs);
read_unlock(&devs_lock); read_unlock(&devs_lock);
unregister_netdev(net_dev); unregister_netdev(net_dev);
kfree(net_dev); free_netdev(net_dev);
} }
return; return;
} }
...@@ -617,7 +617,7 @@ static int br2684_create(unsigned long arg) ...@@ -617,7 +617,7 @@ static int br2684_create(unsigned long arg)
err = register_netdev(netdev); err = register_netdev(netdev);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "br2684_create: register_netdev failed\n"); printk(KERN_ERR "br2684_create: register_netdev failed\n");
kfree(netdev); free_netdev(netdev);
return err; return err;
} }
...@@ -791,7 +791,7 @@ static void __exit br2684_exit(void) ...@@ -791,7 +791,7 @@ static void __exit br2684_exit(void)
list_del(&brdev->br2684_devs); list_del(&brdev->br2684_devs);
unregister_netdev(net_dev); unregister_netdev(net_dev);
kfree(net_dev); free_netdev(net_dev);
} }
} }
......
...@@ -786,7 +786,7 @@ static void __exit atm_clip_exit(void) ...@@ -786,7 +786,7 @@ static void __exit atm_clip_exit(void)
while (dev) { while (dev) {
next = PRIV(dev)->next; next = PRIV(dev)->next;
unregister_netdev(dev); unregister_netdev(dev);
kfree(dev); free_netdev(dev);
dev = next; dev = next;
} }
if (start_timer == 0) del_timer(&idle_timer); if (start_timer == 0) del_timer(&idle_timer);
......
...@@ -864,7 +864,7 @@ static void __exit lane_module_cleanup(void) ...@@ -864,7 +864,7 @@ static void __exit lane_module_cleanup(void)
if (dev_lec[i] != NULL) { if (dev_lec[i] != NULL) {
priv = (struct lec_priv *)dev_lec[i]->priv; priv = (struct lec_priv *)dev_lec[i]->priv;
unregister_netdev(dev_lec[i]); unregister_netdev(dev_lec[i]);
kfree(dev_lec[i]); free_netdev(dev_lec[i]);
dev_lec[i] = NULL; dev_lec[i] = NULL;
} }
} }
......
...@@ -1580,7 +1580,7 @@ static void __exit rose_exit(void) ...@@ -1580,7 +1580,7 @@ static void __exit rose_exit(void)
if (dev) { if (dev) {
unregister_netdev(dev); unregister_netdev(dev);
kfree(dev); free_netdev(dev);
} }
} }
......
...@@ -498,7 +498,7 @@ static void __exit teql_exit(void) ...@@ -498,7 +498,7 @@ static void __exit teql_exit(void)
unregister_qdisc(&master->qops); unregister_qdisc(&master->qops);
unregister_netdev(master->dev); unregister_netdev(master->dev);
kfree(master->dev); free_netdev(master->dev);
} }
spin_unlock(&master_dev_lock); spin_unlock(&master_dev_lock);
} }
......
...@@ -908,7 +908,7 @@ static int wanrouter_delete_interface(struct wan_device *wandev, char *name) ...@@ -908,7 +908,7 @@ static int wanrouter_delete_interface(struct wan_device *wandev, char *name)
unregister_netdev(dev); unregister_netdev(dev);
kfree(dev); free_netdev(dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment