Skip to content

Commit 54447f1

Browse files
weiyjdavem330
authored andcommitted
net: arc_emac: add missing of_node_put() in arc_emac_probe()
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 <[email protected]> Reviewed-by: Peter Chen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5ef9f28 commit 54447f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/arc/emac_main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,10 @@ int arc_emac_probe(struct net_device *ndev, int interface)
771771
priv->dev = dev;
772772

773773
priv->regs = devm_ioremap_resource(dev, &res_regs);
774-
if (IS_ERR(priv->regs))
775-
return PTR_ERR(priv->regs);
774+
if (IS_ERR(priv->regs)) {
775+
err = PTR_ERR(priv->regs);
776+
goto out_put_node;
777+
}
776778

777779
dev_dbg(dev, "Registers base address is 0x%p\n", priv->regs);
778780

0 commit comments

Comments
 (0)