Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d55d014 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

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: default avatarWei Yongjun <weiyj.lk@gmail.com>
Reviewed-by: default avatarKedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6f0b826d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;