Commit 37c67c6e authored by Michal Simek's avatar Michal Simek Committed by David S. Miller

net: emaclite: Not necessary to call devm_iounmap

devm_iounmap is called automatically.
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dcb30e65
...@@ -1075,14 +1075,9 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) ...@@ -1075,14 +1075,9 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
* This function un maps the IO region of the Emaclite device and frees the net * This function un maps the IO region of the Emaclite device and frees the net
* device. * device.
*/ */
static void xemaclite_remove_ndev(struct net_device *ndev, static void xemaclite_remove_ndev(struct net_device *ndev)
struct platform_device *pdev)
{ {
if (ndev) { if (ndev) {
struct net_local *lp = netdev_priv(ndev);
if (lp->base_addr)
devm_iounmap(&pdev->dev, lp->base_addr);
free_netdev(ndev); free_netdev(ndev);
} }
} }
...@@ -1214,7 +1209,7 @@ static int xemaclite_of_probe(struct platform_device *ofdev) ...@@ -1214,7 +1209,7 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
return 0; return 0;
error: error:
xemaclite_remove_ndev(ndev, ofdev); xemaclite_remove_ndev(ndev);
return rc; return rc;
} }
...@@ -1248,7 +1243,7 @@ static int xemaclite_of_remove(struct platform_device *of_dev) ...@@ -1248,7 +1243,7 @@ static int xemaclite_of_remove(struct platform_device *of_dev)
of_node_put(lp->phy_node); of_node_put(lp->phy_node);
lp->phy_node = NULL; lp->phy_node = NULL;
xemaclite_remove_ndev(ndev, of_dev); xemaclite_remove_ndev(ndev);
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