* [PATCH] drivers: bus: fix device node reference leak in __cci_ace_get_port
@ 2025-09-02 7:43 Miaoqian Lin
2025-09-02 9:44 ` Markus Elfring
0 siblings, 1 reply; 3+ messages in thread
From: Miaoqian Lin @ 2025-09-02 7:43 UTC (permalink / raw)
To: Miaoqian Lin, Nicolas Pitre, Lorenzo Pieralisi, linux-kernel; +Cc: stable
Add missing of_node_put() call to release
the device node reference obtained via of_parse_phandle().
Fixes: ed69bdd8fd9b ("drivers: bus: add ARM CCI support")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/bus/arm-cci.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index b8184a903583..af180f884f1d 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -163,14 +163,18 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
int i;
bool ace_match;
struct device_node *cci_portn;
+ int ret = -ENODEV;
cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
for (i = 0; i < nb_cci_ports; i++) {
ace_match = ports[i].type == type;
- if (ace_match && cci_portn == ports[i].dn)
- return i;
+ if (ace_match && cci_portn == ports[i].dn) {
+ ret = i;
+ break;
+ }
}
- return -ENODEV;
+ of_node_put(cci_portn);
+ return ret;
}
int cci_ace_get_port(struct device_node *dn)
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers: bus: fix device node reference leak in __cci_ace_get_port
2025-09-02 7:43 [PATCH] drivers: bus: fix device node reference leak in __cci_ace_get_port Miaoqian Lin
@ 2025-09-02 9:44 ` Markus Elfring
2025-09-02 11:11 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Markus Elfring @ 2025-09-02 9:44 UTC (permalink / raw)
To: Miaoqian Lin, kernel-janitors
Cc: stable, LKML, Lorenzo Pieralisi, Nicolas Pitre
> Add missing of_node_put() call to release
> the device node reference obtained via of_parse_phandle().
1. You may occasionally put more than 58 characters into text lines
of such a change description.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc4#n638
2. Would you like to increase the application of scope-based resource management?
https://elixir.bootlin.com/linux/v6.17-rc4/source/include/linux/of.h#L138
3. How do you think about to append parentheses to the function name
in the summary phrase?
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers: bus: fix device node reference leak in __cci_ace_get_port
2025-09-02 9:44 ` Markus Elfring
@ 2025-09-02 11:11 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-09-02 11:11 UTC (permalink / raw)
To: Markus Elfring
Cc: Miaoqian Lin, kernel-janitors, stable, LKML, Lorenzo Pieralisi,
Nicolas Pitre
On Tue, Sep 02, 2025 at 11:44:10AM +0200, Markus Elfring wrote:
> > Add missing of_node_put() call to release
> > the device node reference obtained via of_parse_phandle().
>
> 1. You may occasionally put more than 58 characters into text lines
> of such a change description.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc4#n638
>
> 2. Would you like to increase the application of scope-based resource management?
> https://elixir.bootlin.com/linux/v6.17-rc4/source/include/linux/of.h#L138
>
> 3. How do you think about to append parentheses to the function name
> in the summary phrase?
>
Hi,
This is the semi-friendly patch-bot of Greg Kroah-Hartman.
Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list. I strongly suggest that you not do this anymore. Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.
Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all. The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback. Please feel free to also ignore emails
from them.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-02 11:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 7:43 [PATCH] drivers: bus: fix device node reference leak in __cci_ace_get_port Miaoqian Lin
2025-09-02 9:44 ` Markus Elfring
2025-09-02 11:11 ` Greg KH
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).