aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Carrasco <[email protected]>2024-10-13 15:29:17 +0200
committerChristophe Leroy <[email protected]>2024-11-14 08:25:45 +0100
commitc9f1efabf8e3b3ff886a42669f7093789dbeca94 (patch)
tree2d738c2d19688ec86c87faa890511c827e8859ba
parent844d098b6f33666ff544f18d7a256a46fe19328d (diff)
soc: fsl: rcpm: fix missing of_node_put() in copy_ippdexpcr1_setting()
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: [email protected] Fixes: e95f287deed2 ("soc: fsl: handle RCPM errata A-008646 on SoC LS1021A") Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christophe Leroy <[email protected]>
-rw-r--r--drivers/soc/fsl/rcpm.c1
1 files changed, 1 insertions, 0 deletions
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;