mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
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: stable@vger.kernel.org
Fixes: e95f287dee
("soc: fsl: handle RCPM errata A-008646 on SoC LS1021A")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20241013-rcpm-of_node_put-v1-1-9a8e55a01eae@gmail.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
This commit is contained in:
parent
844d098b6f
commit
c9f1efabf8
@ -36,6 +36,7 @@ static void copy_ippdexpcr1_setting(u32 val)
|
||||
return;
|
||||
|
||||
regs = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
if (!regs)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user