提交 7af355e6 编写于 作者: C Christophe JAILLET 提交者: Linus Walleij

pinctrl: sirf: atlas7: Add missing 'of_node_put()'

Reference to 'sys2pci_np' should be dropped in all cases here, not only in
error handling path.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 c32c22ee
...@@ -5420,14 +5420,15 @@ static int atlas7_pinmux_probe(struct platform_device *pdev) ...@@ -5420,14 +5420,15 @@ static int atlas7_pinmux_probe(struct platform_device *pdev)
sys2pci_np = of_find_node_by_name(NULL, "sys2pci"); sys2pci_np = of_find_node_by_name(NULL, "sys2pci");
if (!sys2pci_np) if (!sys2pci_np)
return -EINVAL; return -EINVAL;
ret = of_address_to_resource(sys2pci_np, 0, &res); ret = of_address_to_resource(sys2pci_np, 0, &res);
of_node_put(sys2pci_np);
if (ret) if (ret)
return ret; return ret;
pmx->sys2pci_base = devm_ioremap_resource(&pdev->dev, &res); pmx->sys2pci_base = devm_ioremap_resource(&pdev->dev, &res);
if (IS_ERR(pmx->sys2pci_base)) { if (IS_ERR(pmx->sys2pci_base))
of_node_put(sys2pci_np);
return -ENOMEM; return -ENOMEM;
}
pmx->dev = &pdev->dev; pmx->dev = &pdev->dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册