Commit aee11891 authored by Stephen Hemminger's avatar Stephen Hemminger

[NET]: free_netdev - pcmcia drivers.

Replace kfree with free_netdev
parent 0b154e97
......@@ -384,8 +384,10 @@ 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);
free_netdev(dev);
} else
kfree(dev);
} /* tc574_detach */
......
......@@ -308,8 +308,10 @@ 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);
free_netdev(dev);
} else
kfree(dev);
} /* tc589_detach */
......
......@@ -267,8 +267,10 @@ 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);
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,8 +365,10 @@ 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);
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,8 +579,10 @@ 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);
free_netdev(dev);
} else
kfree(dev);
} /* nmclan_detach */
......
......@@ -367,8 +367,10 @@ 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);
free_netdev(&info->dev);
} else
kfree(info);
} /* pcnet_detach */
......
......@@ -443,8 +443,10 @@ 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);
free_netdev(dev);
} else
kfree(dev);
} /* smc91c92_detach */
......
......@@ -699,8 +699,10 @@ xirc2ps_detach(dev_link_t * link)
/* Unlink device structure, free it */
*linkp = link->next;
if (link->dev)
if (link->dev) {
unregister_netdev(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