* [PATCH v3] arm: mach-omap2: omap4-common: Fix refcount leak bug
@ 2022-06-28 11:29 Liang He
2022-07-04 7:26 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Liang He @ 2022-06-28 11:29 UTC (permalink / raw)
To: tony, linux-omap, windhl
In omap4_sram_init(), of_find_compatible_node() will return a node
pointer with refcount incremented. We should use of_node_put() when
it is not used anymore.
Signed-off-by: Liang He <windhl@126.com>
---
changelog:
v3: change the order of of_node_put() based on tony's advice
v2: merge similar bugs in omap2 into one commit
v1: fix missing of_node_put() bugs
arch/arm/mach-omap2/omap4-common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 6d1eb4eefefe..d9ed2a5dcd5e 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -140,6 +140,7 @@ static int __init omap4_sram_init(void)
__func__);
else
sram_sync = (void __iomem *)gen_pool_alloc(sram_pool, PAGE_SIZE);
+ of_node_put(np);
return 0;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] arm: mach-omap2: omap4-common: Fix refcount leak bug
2022-06-28 11:29 [PATCH v3] arm: mach-omap2: omap4-common: Fix refcount leak bug Liang He
@ 2022-07-04 7:26 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2022-07-04 7:26 UTC (permalink / raw)
To: Liang He; +Cc: linux-omap
* Liang He <windhl@126.com> [220628 14:24]:
> In omap4_sram_init(), of_find_compatible_node() will return a node
> pointer with refcount incremented. We should use of_node_put() when
> it is not used anymore.
Thanks applying into omap-for-v5.20/soc.
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-04 7:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 11:29 [PATCH v3] arm: mach-omap2: omap4-common: Fix refcount leak bug Liang He
2022-07-04 7:26 ` Tony Lindgren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.