提交 bdf767ca 编写于 作者: Y YueHaibing 提交者: David S. Miller

net: qcom/emac: Add missing of_node_put()

Add missing of_node_put() call for device node returned by
of_parse_phandle().
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Acked-by: NTimur Tabi <timur@codeaurora.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 99519122
...@@ -384,6 +384,7 @@ int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt) ...@@ -384,6 +384,7 @@ int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt)
} }
sgmii_pdev = of_find_device_by_node(np); sgmii_pdev = of_find_device_by_node(np);
of_node_put(np);
if (!sgmii_pdev) { if (!sgmii_pdev) {
dev_err(&pdev->dev, "invalid internal-phy property\n"); dev_err(&pdev->dev, "invalid internal-phy property\n");
return -ENODEV; return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册