mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
net: freescale: ucc_geth: call of_node_put once
Move it up to avoid placing it in both the error and success paths. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260224014141.352642-1-rosenp@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7235555e9a
commit
d2adf01780
|
|
@ -3470,14 +3470,13 @@ static int ucc_geth_probe(struct platform_device* ofdev)
|
|||
phy_node = of_parse_phandle(np, "phy-handle", 0);
|
||||
if (phy_node) {
|
||||
prop = of_get_property(phy_node, "interface", NULL);
|
||||
of_node_put(phy_node);
|
||||
if (prop) {
|
||||
dev_err(&ofdev->dev,
|
||||
"Device-tree property 'interface' is no longer supported. Please use 'phy-connection-type' instead.");
|
||||
of_node_put(phy_node);
|
||||
err = -EINVAL;
|
||||
goto err_put_tbi;
|
||||
}
|
||||
of_node_put(phy_node);
|
||||
}
|
||||
|
||||
err = of_get_phy_mode(np, &phy_interface);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user