* [PATCH] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init
@ 2025-09-02 7:59 Miaoqian Lin
2025-09-02 8:46 ` Markus Elfring
2025-09-05 22:22 ` Kevin Hilman
0 siblings, 2 replies; 3+ messages in thread
From: Miaoqian Lin @ 2025-09-02 7:59 UTC (permalink / raw)
To: Kevin Hilman, Aaro Koskinen, Andreas Kemnade, Roger Quadros,
Tony Lindgren, Russell King, Santosh Shilimkar, Dave Gerlach,
linux-omap, linux-arm-kernel, linux-kernel
Cc: linmq006, stable
Add missing of_node_put() calls to release
device node references obtained via of_parse_phandle().
Fixes: 06ee7a950b6a ("ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
arch/arm/mach-omap2/pm33xx-core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/pm33xx-core.c b/arch/arm/mach-omap2/pm33xx-core.c
index c907478be196..4abb86dc98fd 100644
--- a/arch/arm/mach-omap2/pm33xx-core.c
+++ b/arch/arm/mach-omap2/pm33xx-core.c
@@ -388,12 +388,15 @@ static int __init amx3_idle_init(struct device_node *cpu_node, int cpu)
if (!state_node)
break;
- if (!of_device_is_available(state_node))
+ if (!of_device_is_available(state_node)) {
+ of_node_put(state_node);
continue;
+ }
if (i == CPUIDLE_STATE_MAX) {
pr_warn("%s: cpuidle states reached max possible\n",
__func__);
+ of_node_put(state_node);
break;
}
@@ -403,6 +406,7 @@ static int __init amx3_idle_init(struct device_node *cpu_node, int cpu)
states[state_count].wfi_flags |= WFI_FLAG_WAKE_M3 |
WFI_FLAG_FLUSH_CACHE;
+ of_node_put(state_node);
state_count++;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init
2025-09-02 7:59 [PATCH] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init Miaoqian Lin
@ 2025-09-02 8:46 ` Markus Elfring
2025-09-05 22:22 ` Kevin Hilman
1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2025-09-02 8:46 UTC (permalink / raw)
To: Miaoqian Lin, linux-omap, linux-arm-kernel
Cc: stable, tony, LKML, Aaro Koskinen, Andreas Kemnade, Dave Gerlach,
Kevin Hilman, Roger Quadros, Russell King, Santosh Shilimkar
> Add missing of_node_put() calls to release
> device node references obtained via of_parse_phandle().
You may occasionally put more than 55 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
How do you think about to increase the application of scope-based resource management?
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init
2025-09-02 7:59 [PATCH] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init Miaoqian Lin
2025-09-02 8:46 ` Markus Elfring
@ 2025-09-05 22:22 ` Kevin Hilman
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2025-09-05 22:22 UTC (permalink / raw)
To: Aaro Koskinen, Andreas Kemnade, Roger Quadros, Tony Lindgren,
Russell King, Santosh Shilimkar, linux-omap, linux-arm-kernel,
linux-kernel, Miaoqian Lin
Cc: stable
On Tue, 02 Sep 2025 15:59:43 +0800, Miaoqian Lin wrote:
> Add missing of_node_put() calls to release
> device node references obtained via of_parse_phandle().
>
>
Applied, thanks!
[1/1] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init
commit: 74139a64e8cedb6d971c78d5d17384efeced1725
Best regards,
--
Kevin Hilman <khilman@baylibre.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-06 0:14 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:59 [PATCH] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init Miaoqian Lin
2025-09-02 8:46 ` Markus Elfring
2025-09-05 22:22 ` Kevin Hilman
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).