From: Miaoqian Lin <linmq006@gmail.com>
To: Liviu Dudau <liviu.dudau@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Miaoqian Lin <linmq006@gmail.com>, Rob Herring <robh@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH] bus: vexpress-config: fix device node reference leak in vexpress_syscfg_probe
Date: Tue, 2 Sep 2025 16:19:27 +0800 [thread overview]
Message-ID: <20250902081929.2411971-1-linmq006@gmail.com> (raw)
Add missing of_node_put() call to release
the device node reference obtained via of_parse_phandle().
Since we don't actually use the node, decrement the
reference count immediately after obtaining it.
Fixes: a5a38765ac79 ("bus: vexpress-config: simplify config bus probing")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/bus/vexpress-config.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
index 64ee920721ee..aa17f819dfc9 100644
--- a/drivers/bus/vexpress-config.c
+++ b/drivers/bus/vexpress-config.c
@@ -393,6 +393,7 @@ static int vexpress_syscfg_probe(struct platform_device *pdev)
struct device_node *bridge_np;
bridge_np = of_parse_phandle(node, "arm,vexpress,config-bridge", 0);
+ of_node_put(bridge_np);
if (bridge_np != pdev->dev.parent->of_node)
continue;
--
2.35.1
next reply other threads:[~2025-09-02 8:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 8:19 Miaoqian Lin [this message]
2025-09-02 8:35 ` [PATCH] bus: vexpress-config: fix device node reference leak in vexpress_syscfg_probe Markus Elfring
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=20250902081929.2411971-1-linmq006@gmail.com \
--to=linmq006@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
--cc=sudeep.holla@arm.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