提交 54447f1a 编写于 作者: W Wei Yongjun 提交者: David S. Miller

net: arc_emac: add missing of_node_put() in arc_emac_probe()

commit a94efbd7 ("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: NWei Yongjun <weiyj.lk@gmail.com>
Reviewed-by: NPeter Chen <peter.chen@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5ef9f289
...@@ -771,8 +771,10 @@ int arc_emac_probe(struct net_device *ndev, int interface) ...@@ -771,8 +771,10 @@ int arc_emac_probe(struct net_device *ndev, int interface)
priv->dev = dev; priv->dev = dev;
priv->regs = devm_ioremap_resource(dev, &res_regs); priv->regs = devm_ioremap_resource(dev, &res_regs);
if (IS_ERR(priv->regs)) if (IS_ERR(priv->regs)) {
return PTR_ERR(priv->regs); err = PTR_ERR(priv->regs);
goto out_put_node;
}
dev_dbg(dev, "Registers base address is 0x%p\n", priv->regs); dev_dbg(dev, "Registers base address is 0x%p\n", priv->regs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册