From: Zhang Zekun <zhangzekun11@huawei.com>
To: <robh@kernel.org>, <saravanak@google.com>,
<justin.chen@broadcom.com>, <florian.fainelli@broadcom.com>,
<andrew+netdev@lunn.ch>, <kuba@kernel.org>,
<o.rempel@pengutronix.de>, <kory.maincent@bootlin.com>,
<jacopo+renesas@jmondi.org>,
<kieran.bingham+renesas@ideasonboard.com>,
<laurent.pinchart+renesas@ideasonboard.com>,
<maddy@linux.ibm.com>, <mpe@ellerman.id.au>, <npiggin@gmail.com>,
<olteanv@gmail.com>, <davem@davemloft.net>,
<taras.chornyi@plvision.eu>, <edumazet@google.com>,
<pabeni@redhat.com>, <sudeep.holla@arm.com>,
<cristian.marussi@arm.com>
Cc: <arm-scmi@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>,
<linux-media@vger.kernel.org>, <netdev@vger.kernel.org>,
<devicetree@vger.kernel.org>, <chenjun102@huawei.com>,
<zhangzekun11@huawei.com>
Subject: [PATCH 3/9] net: pse-pd: Add missing of_node_get() before of_find_node_by_name()
Date: Fri, 7 Feb 2025 09:31:11 +0800 [thread overview]
Message-ID: <20250207013117.104205-4-zhangzekun11@huawei.com> (raw)
In-Reply-To: <20250207013117.104205-1-zhangzekun11@huawei.com>
of_find_node_by_name() will decrease the refount of the device_node.
So, get the device_node before passing to it.
Fixes: 20e6d190ffe1 ("net: pse-pd: Add TI TPS23881 PSE controller driver")
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
---
drivers/net/pse-pd/tps23881.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c
index 5e9dda2c0eac..a595358ac60b 100644
--- a/drivers/net/pse-pd/tps23881.c
+++ b/drivers/net/pse-pd/tps23881.c
@@ -502,7 +502,7 @@ tps23881_get_of_channels(struct tps23881_priv *priv,
if (!priv->np)
return -EINVAL;
- channels_node = of_find_node_by_name(priv->np, "channels");
+ channels_node = of_find_node_by_name_balanced(priv->np, "channels");
if (!channels_node)
return -EINVAL;
--
2.22.0
next prev parent reply other threads:[~2025-02-07 1:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 1:31 [PATCH 0/9] Add wrapper function of_find_node_by_name_balanced() Zhang Zekun
2025-02-07 1:31 ` [PATCH 1/9] of: Add warpper " Zhang Zekun
2025-02-07 8:24 ` Oleksij Rempel
2025-02-07 8:57 ` Laurent Pinchart
2025-02-07 11:28 ` zhangzekun (A)
2025-02-07 15:37 ` Laurent Pinchart
2025-02-08 4:18 ` Dan Carpenter
2025-04-25 15:30 ` Dan Carpenter
2025-04-25 17:07 ` Laurent Pinchart
2025-06-10 19:39 ` Andy Shevchenko
2025-06-10 20:03 ` Laurent Pinchart
2025-06-10 20:17 ` Andy Shevchenko
2025-02-10 6:47 ` zhangzekun (A)
2025-02-10 10:03 ` Laurent Pinchart
2025-02-11 11:26 ` zhangzekun (A)
2025-02-11 11:43 ` Laurent Pinchart
2025-02-11 14:15 ` Rob Herring
2025-02-12 5:47 ` Krzysztof Kozlowski
2025-02-07 1:31 ` [PATCH 2/9] net: bcmasp: Add missing of_node_get() before of_find_node_by_name() Zhang Zekun
2025-02-12 5:52 ` Krzysztof Kozlowski
2025-02-12 6:50 ` zhangzekun (A)
2025-02-07 1:31 ` Zhang Zekun [this message]
2025-02-07 1:31 ` [PATCH 4/9] media: max9286: Use of_find_node_by_name_balanced() to find device_node Zhang Zekun
2025-02-07 1:31 ` [PATCH 5/9] powerpc: " Zhang Zekun
2025-02-07 1:31 ` [PATCH 6/9] net: dsa: " Zhang Zekun
2025-02-07 1:31 ` [PATCH 7/9] net: dsa: hellcreek: " Zhang Zekun
2025-02-07 1:31 ` [PATCH 8/9] net: prestera: " Zhang Zekun
2025-02-07 1:31 ` [PATCH 9/9] regulator: scmi: " Zhang Zekun
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=20250207013117.104205-4-zhangzekun11@huawei.com \
--to=zhangzekun11@huawei.com \
--cc=andrew+netdev@lunn.ch \
--cc=arm-scmi@vger.kernel.org \
--cc=chenjun102@huawei.com \
--cc=cristian.marussi@arm.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=jacopo+renesas@jmondi.org \
--cc=justin.chen@broadcom.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=o.rempel@pengutronix.de \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=sudeep.holla@arm.com \
--cc=taras.chornyi@plvision.eu \
/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;
as well as URLs for NNTP newsgroup(s).