提交 f1f02fa4 编写于 作者: U Uwe Kleine-König 提交者: David S. Miller

net: ucc_geth: make probe consistently acquire a reference to the phy node

When the driver attaches to a device that has a phy handle the probe
routine returns with a reference to that node. This reference is
correctly dropped in the error path and the remove function. In the
fixed phy case however no reference is acquired and so the error path
might drop a reference the driver isn't holding. Fix that by getting a
reference to the MAC.

Fixes: 87009814 ("ucc_geth: use the new fixed PHY helpers")
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fa310789
......@@ -3794,7 +3794,7 @@ static int ucc_geth_probe(struct platform_device* ofdev)
if (err)
return err;
}
ug_info->phy_node = np;
ug_info->phy_node = of_node_get(np);
}
/* Find the TBI PHY node. If it's not there, we don't support SGMII */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册