Skip to content

Commit

Permalink
net: qcom/emac: Add missing of_node_put()
Browse files Browse the repository at this point in the history
Add missing of_node_put() call for device node returned by
of_parse_phandle().

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YueHaibing authored and David S. Miller committed Jun 15, 2018
1 parent 9951912 commit bdf767c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt)
}

sgmii_pdev = of_find_device_by_node(np);
of_node_put(np);
if (!sgmii_pdev) {
dev_err(&pdev->dev, "invalid internal-phy property\n");
return -ENODEV;
Expand Down

0 comments on commit bdf767c

Please sign in to comment.