提交 25850c31 编写于 作者: C Christophe JAILLET 提交者: David S. Miller

fsl/fman: Add a missing 'of_node_put()' call in an error handling path

If 'of_phy_find_device()' fails, we must undo the previous 'of_node_get()'
call, as done the the following error handling code.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 336eac43
......@@ -821,6 +821,7 @@ static int mac_probe(struct platform_device *_of_dev)
phy = of_phy_find_device(mac_dev->phy_node);
if (!phy) {
err = -EINVAL;
of_node_put(mac_dev->phy_node);
goto _return_of_get_parent;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册