summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/arc
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-03 10:58:35 +0000
committerDavid S. Miller <davem@davemloft.net>2016-08-06 00:07:38 -0400
commit54447f1ad73414ebb052e9a33d079cabed3a03e8 (patch)
tree1a477222c5c8636fc383d8bb8a7792e7d514b3ee /drivers/net/ethernet/arc
parent5ef9f289c4e698054e5687edb54f0da3cdc9173a (diff)
downloadlinux-54447f1ad73414ebb052e9a33d079cabed3a03e8.tar.bz2
net: arc_emac: add missing of_node_put() in arc_emac_probe()
commit a94efbd7cc45 ("ethernet: arc: emac_main: add missing of_node_put after calling of_parse_phandle") added missing of_node_put after calling of_parse_phandle, but missing the devm_ioremap_resource() error handling case. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/arc')
-rw-r--r--drivers/net/ethernet/arc/emac_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 4bff0f3040df..b0da9693f28a 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -771,8 +771,10 @@ int arc_emac_probe(struct net_device *ndev, int interface)
priv->dev = dev;
priv->regs = devm_ioremap_resource(dev, &res_regs);
- if (IS_ERR(priv->regs))
- return PTR_ERR(priv->regs);
+ if (IS_ERR(priv->regs)) {
+ err = PTR_ERR(priv->regs);
+ goto out_put_node;
+ }
dev_dbg(dev, "Registers base address is 0x%p\n", priv->regs);