Skip to content

Commit

Permalink
net: arc_emac: add missing of_node_put() in arc_emac_probe()
Browse files Browse the repository at this point in the history
commit a94efbd ("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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Aug 6, 2016
1 parent 5ef9f28 commit 54447f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/arc/emac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 54447f1

Please sign in to comment.