From: Sudeep Holla <sudeep.holla@arm.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Felix Gu <gu_0233@qq.com>,
Cristian Marussi <cristian.marussi@arm.com>,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Sudeep Holla <sudeep.holla@arm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: arm_scpi: Fix a reference leak on device node
Date: Mon, 19 Jan 2026 15:25:21 +0000 [thread overview]
Message-ID: <aW5M4SoEtLfQ4tC2@bogus> (raw)
In-Reply-To: <aW0xWZ-KylipPF7M@stanley.mountain>
On Sun, Jan 18, 2026 at 10:15:37PM +0300, Dan Carpenter wrote:
> On Fri, Jan 16, 2026 at 08:54:39PM +0800, Felix Gu wrote:
> > When calling of_parse_phandle_with_args(), the caller is responsible
> > to call of_node_put() to release the reference of device node.
> > In scpi_dev_domain_id, it does not release the reference.
> >
> > Fixes: 45ca7df7c345 ("firmware: arm_scpi: add support to populate OPPs and get transition latency")
> >
>
> nit: delete the blank line after the Fixes tag.
>
> > Signed-off-by: Felix Gu <gu_0233@qq.com>
>
> Did you find this issue just by reviewing the code? I read the comments
> and then looked at a sample of four other callers and none of them
> called of_node_put(). So it's a weird thing. If this is really the rule
> then we should have a static checker heuristic to enforce it.
>
I agree. I see bit of inconsistency at call sites especially in SC{P,M}I
related modules I maintain. It seem to me based on the description at
of_parse_phandle_with_args() definition and various other call sites as
examples, we need to have of_node_put(). That said, I don't have any easier
way to validate these, so I am happy for any reviews and recommendations.
--
Regards,
Sudeep
next prev parent reply other threads:[~2026-01-19 15:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 12:54 [PATCH] firmware: arm_scpi: Fix a reference leak on device node Felix Gu
2026-01-16 13:36 ` Markus Elfring
2026-01-16 15:33 ` Sudeep Holla
2026-01-16 16:13 ` Markus Elfring
2026-01-18 12:58 ` Dan Carpenter
2026-01-18 19:15 ` [PATCH] " Dan Carpenter
2026-01-19 15:25 ` Sudeep Holla [this message]
2026-01-19 17:55 ` Felix Gu
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=aW5M4SoEtLfQ4tC2@bogus \
--to=sudeep.holla@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=dan.carpenter@linaro.org \
--cc=gu_0233@qq.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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