net: freescale: ucc_geth: call of_node_put once
PATCH 1/1 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 <[email protected]>
--- drivers/net/ethernet/freescale/ucc_geth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/freescale/ucc_geth.c +1 -2
@@ -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);
--
2.53.0
+ Maxime
Quoted 3 lines · Rosen Penev
Move it up to avoid placing it in both the error and success paths.
Signed-off-by Rosen Penev <[email protected]>
Reviewed-by Simon Horman <[email protected]>
Quoted 28 lines
--- drivers/net/ethernet/freescale/ucc_geth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/freescale/ucc_geth.c +1
-3@@ -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); --2.53.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 23 Feb 2026 17:41:41 -0800 you wrote:
Move it up to avoid placing it in both the error and success paths.
Signed-off-by Rosen Penev <[email protected]>--- drivers/net/ethernet/freescale/ucc_geth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)[...]
Here is the summary with links:
- [net-next] net: freescale: ucc_geth: call of_node_put once
https://git.kernel.org/netdev/net-next/c/d2adf01780b8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html