提交 4d55d014 编写于 作者: W Wei Yongjun 提交者: David S. Miller

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: NWei Yongjun <weiyj.lk@gmail.com>
Reviewed-by: NKedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6f0b826d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册