public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
* [PATCH v1] ARM: imx3: Fix CCM node reference leak
@ 2026-05-14  3:40 Yuho Choi
  2026-06-01 16:18 ` Frank.Li
  0 siblings, 1 reply; 2+ messages in thread
From: Yuho Choi @ 2026-05-14  3:40 UTC (permalink / raw)
  To: Russell King, Frank Li
  Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	linux-arm-kernel, imx, linux-kernel, Yuho Choi

of_find_compatible_node() returns a referenced device node. The i.MX31
and i.MX35 early init paths use the node to map the CCM registers with
of_iomap(), but never drop the node reference.

Release the node after the mapping is created.

Fixes: 2cf98d12958c ("ARM: imx3: Retrieve the CCM base address from devicetree")
Signed-off-by: Yuho Choi <dbgh9129@gmail•com>
---
 arch/arm/mach-imx/mm-imx3.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 0788c5cc7f9e..9b0b014d7fe2 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -106,6 +106,7 @@ void __init imx31_init_early(void)
 	arm_pm_idle = imx31_idle;
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx31-ccm");
 	mx3_ccm_base = of_iomap(np, 0);
+	of_node_put(np);
 	BUG_ON(!mx3_ccm_base);
 }
 #endif /* ifdef CONFIG_SOC_IMX31 */
@@ -143,6 +144,7 @@ void __init imx35_init_early(void)
 	arch_ioremap_caller = imx3_ioremap_caller;
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx35-ccm");
 	mx3_ccm_base = of_iomap(np, 0);
+	of_node_put(np);
 	BUG_ON(!mx3_ccm_base);
 }
 #endif /* ifdef CONFIG_SOC_IMX35 */
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] ARM: imx3: Fix CCM node reference leak
  2026-05-14  3:40 [PATCH v1] ARM: imx3: Fix CCM node reference leak Yuho Choi
@ 2026-06-01 16:18 ` Frank.Li
  0 siblings, 0 replies; 2+ messages in thread
From: Frank.Li @ 2026-06-01 16:18 UTC (permalink / raw)
  To: Russell King, Yuho Choi
  Cc: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	linux-arm-kernel, imx, linux-kernel

From: Frank Li <Frank.Li@nxp•com>


On Wed, 13 May 2026 23:40:04 -0400, Yuho Choi wrote:
> of_find_compatible_node() returns a referenced device node. The i.MX31
> and i.MX35 early init paths use the node to map the CCM registers with
> of_iomap(), but never drop the node reference.
> 
> Release the node after the mapping is created.
> 
> 
> [...]

Applied, thanks!

[1/1] ARM: imx3: Fix CCM node reference leak
      commit: 36d46348eb5fc4bc505cd2290ddd70c25fbe6bb3

Best regards,
-- 
Frank Li <Frank.Li@nxp•com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-01 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  3:40 [PATCH v1] ARM: imx3: Fix CCM node reference leak Yuho Choi
2026-06-01 16:18 ` Frank.Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox