aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx/xilinx_emaclite.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2013-09-12 03:05:10 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-20 14:41:01 -0400
commit37c67c6e2bb5b8f287d92e543acb0f8fa41af0e9 (patch)
tree3035c8ae35c14b77b60cde86b4dacdcc4b0b4609 /drivers/net/ethernet/xilinx/xilinx_emaclite.c
parentdcb30e659287a6b40dafed1362532da42ec27229 (diff)
net: emaclite: Not necessary to call devm_iounmap
devm_iounmap is called automatically. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_emaclite.c')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_emaclite.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 4c619ea5189f..de3909878f42 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1075,14 +1075,9 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
1075 * This function un maps the IO region of the Emaclite device and frees the net 1075 * This function un maps the IO region of the Emaclite device and frees the net
1076 * device. 1076 * device.
1077 */ 1077 */
1078static void xemaclite_remove_ndev(struct net_device *ndev, 1078static void xemaclite_remove_ndev(struct net_device *ndev)
1079 struct platform_device *pdev)
1080{ 1079{
1081 if (ndev) { 1080 if (ndev) {
1082 struct net_local *lp = netdev_priv(ndev);
1083
1084 if (lp->base_addr)
1085 devm_iounmap(&pdev->dev, lp->base_addr);
1086 free_netdev(ndev); 1081 free_netdev(ndev);
1087 } 1082 }
1088} 1083}
@@ -1214,7 +1209,7 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
1214 return 0; 1209 return 0;
1215 1210
1216error: 1211error:
1217 xemaclite_remove_ndev(ndev, ofdev); 1212 xemaclite_remove_ndev(ndev);
1218 return rc; 1213 return rc;
1219} 1214}
1220 1215
@@ -1248,7 +1243,7 @@ static int xemaclite_of_remove(struct platform_device *of_dev)
1248 of_node_put(lp->phy_node); 1243 of_node_put(lp->phy_node);
1249 lp->phy_node = NULL; 1244 lp->phy_node = NULL;
1250 1245
1251 xemaclite_remove_ndev(ndev, of_dev); 1246 xemaclite_remove_ndev(ndev);
1252 1247
1253 return 0; 1248 return 0;
1254} 1249}