From: Rosen Penev <rosenp@gmail.com>
To: netdev@vger.kernel.org
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linuxppc-dev@lists.ozlabs.org (open list:FREESCALE QUICC ENGINE
UCC ETHERNET DRIVER), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH net-next] net: freescale: ucc_geth: call of_node_put once
Date: Mon, 23 Feb 2026 17:41:41 -0800 [thread overview]
Message-ID: <20260224014141.352642-1-rosenp@gmail.com> (raw)
Move it up to avoid placing it in both the error and success paths.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/ethernet/freescale/ucc_geth.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 78d72409b6e0..4d598693d7a6 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -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
next reply other threads:[~2026-02-24 1:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 1:41 Rosen Penev [this message]
2026-02-24 17:13 ` [PATCH net-next] net: freescale: ucc_geth: call of_node_put once Simon Horman
2026-02-25 4:09 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260224014141.352642-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox