Commit aee11891 authored by Stephen Hemminger's avatar Stephen Hemminger

[NET]: free_netdev - pcmcia drivers.

Replace kfree with free_netdev
parent 0b154e97
......@@ -384,9 +384,11 @@ static void tc574_detach(dev_link_t *link)
/* Unlink device structure, free bits */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(dev);
kfree(dev);
free_netdev(dev);
} else
kfree(dev);
} /* tc574_detach */
......
......@@ -308,9 +308,11 @@ static void tc589_detach(dev_link_t *link)
/* Unlink device structure, free bits */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(dev);
kfree(dev);
free_netdev(dev);
} else
kfree(dev);
} /* tc589_detach */
......
......@@ -267,9 +267,11 @@ static void axnet_detach(dev_link_t *link)
/* Unlink device structure, free bits */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(&info->dev);
kfree(info);
free_netdev(&info->dev);
} else
kfree(info);
} /* axnet_detach */
......
......@@ -329,7 +329,7 @@ static void com20020_detach(dev_link_t *link)
DEBUG(1,"kfree...\n");
kfree(dev->priv);
kfree(dev);
free_netdev(dev);
}
DEBUG(1,"kfree2...\n");
kfree(info);
......
......@@ -365,9 +365,11 @@ static void fmvj18x_detach(dev_link_t *link)
/* Unlink device structure, free pieces */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(dev);
kfree(dev);
free_netdev(dev);
} else
kfree(dev);
} /* fmvj18x_detach */
......
......@@ -306,7 +306,7 @@ static void ibmtr_detach(dev_link_t *link)
/* Unlink device structure, free bits */
*linkp = link->next;
unregister_netdev(dev);
kfree(dev);
free_netdev(dev);
} /* ibmtr_detach */
/*======================================================================
......
......@@ -579,9 +579,11 @@ static void nmclan_detach(dev_link_t *link)
/* Unlink device structure, free bits */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(dev);
kfree(dev);
free_netdev(dev);
} else
kfree(dev);
} /* nmclan_detach */
......
......@@ -367,9 +367,11 @@ static void pcnet_detach(dev_link_t *link)
/* Unlink device structure, free bits */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(&info->dev);
kfree(info);
free_netdev(&info->dev);
} else
kfree(info);
} /* pcnet_detach */
......
......@@ -443,9 +443,11 @@ static void smc91c92_detach(dev_link_t *link)
/* Unlink device structure, free bits */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(dev);
kfree(dev);
free_netdev(dev);
} else
kfree(dev);
} /* smc91c92_detach */
......
......@@ -699,9 +699,11 @@ xirc2ps_detach(dev_link_t * link)
/* Unlink device structure, free it */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(dev);
kfree(dev);
free_netdev(dev);
} else
kfree(dev);
} /* xirc2ps_detach */
......
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