* [PATCH] soc: fsl: rcpm: fix missing of_node_put() in copy_ippdexpcr1_setting()
@ 2024-10-13 13:29 Javier Carrasco
0 siblings, 0 replies; only message in thread
From: Javier Carrasco @ 2024-10-13 13:29 UTC (permalink / raw)
To: Christophe Leroy, Li Yang, Ran Wang, Biwen Li
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, stable, Javier Carrasco
of_find_compatible_node() requires a call to of_node_put() when the
pointer to the node is not required anymore to decrement its refcount
and avoid leaking memory.
Add the missing call to of_node_put() after the node has been used.
Cc: stable@vger.kernel.org
Fixes: e95f287deed2 ("soc: fsl: handle RCPM errata A-008646 on SoC LS1021A")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
drivers/soc/fsl/rcpm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
index 3d0cae30c769..06bd94b29fb3 100644
--- a/drivers/soc/fsl/rcpm.c
+++ b/drivers/soc/fsl/rcpm.c
@@ -36,6 +36,7 @@ static void copy_ippdexpcr1_setting(u32 val)
return;
regs = of_iomap(np, 0);
+ of_node_put(np);
if (!regs)
return;
---
base-commit: d61a00525464bfc5fe92c6ad713350988e492b88
change-id: 20241013-rcpm-of_node_put-5e94e5bf1230
Best regards,
--
Javier Carrasco <javier.carrasco.cruz@gmail.com>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-13 13:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-13 13:29 [PATCH] soc: fsl: rcpm: fix missing of_node_put() in copy_ippdexpcr1_setting() Javier Carrasco
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®