summaryrefslogtreecommitdiff
path: root/drivers/net/phy/xilinx_gmii2rgmii.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-22 01:46:15 +0300
committerDavid S. Miller <davem@davemloft.net>2016-08-23 04:07:47 +0300
commit4d55d014c53d0d011d4cec85fa0c248a97e8eb06 (patch)
tree5643e2bddbd8f10e3df65105c8782d5c32fa0f4b /drivers/net/phy/xilinx_gmii2rgmii.c
parent6f0b826da4a33e83501d6c1dc977afa0f5f7166f (diff)
downloadlinux-4d55d014c53d0d011d4cec85fa0c248a97e8eb06.tar.xz
net: phy: Add missing of_node_put() in xgmiitorgmii_probe()
This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exitting this function. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Reviewed-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/xilinx_gmii2rgmii.c')
-rw-r--r--drivers/net/phy/xilinx_gmii2rgmii.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index e7a20ec2d8f7..f38be7094362 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -75,6 +75,7 @@ int xgmiitorgmii_probe(struct mdio_device *mdiodev)
}
priv->phy_dev = of_phy_find_device(phy_node);
+ of_node_put(phy_node);
if (!priv->phy_dev) {
dev_info(dev, "Couldn't find phydev\n");
return -EPROBE_DEFER;