ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init
Subsystems (5)
PATCH 1/1 ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init
Add missing of_node_put() calls to release device node references obtained via of_parse_phandle().
--- arch/arm/mach-omap2/pm33xx-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/pm33xx-core.c +5 -1
@@ -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++; }
Signature · 1 line
2.35.1
Quoted 2 lines
Add missing
of_node_put()calls to release device node references obtained viaof_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
Quoted 4 lines · Miaoqian Lin
Add missing
of_node_put()calls to release device node references obtained viaof_parse_phandle().
Applied, thanks!
[1/1] ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init
commit: 74139a64e8cedb6d971c78d5d17384efeced1725
Best regards,
Signature · 1 line
Kevin Hilman <[email protected]>