diff mbox series

soc: fsl: Add missing of_node_put() after using device_node

Message ID 20241106071123.49678-1-zhangzekun11@huawei.com (mailing list archive)
State Superseded
Delegated to: Christophe Leroy
Headers show
Series soc: fsl: Add missing of_node_put() after using device_node | expand

Commit Message

Zhang Zekun Nov. 6, 2024, 7:11 a.m. UTC
of_find_compatible_node() will increase the refcount of the device_node.
Decrease the refcount once finish using it.

Fixes: e95f287deed2 ("soc: fsl: handle RCPM errata A-008646 on SoC LS1021A")
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
---
 drivers/soc/fsl/rcpm.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Christophe Leroy Nov. 14, 2024, 7:29 a.m. UTC | #1
Hi,

Le 06/11/2024 à 08:11, Zhang Zekun a écrit :
> of_find_compatible_node() will increase the refcount of the device_node.
> Decrease the refcount once finish using it.
> 
> Fixes: e95f287deed2 ("soc: fsl: handle RCPM errata A-008646 on SoC LS1021A")
> Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>

Your patch is redundant with 
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20241013-rcpm-of_node_put-v1-1-9a8e55a01eae@gmail.com/

Christophe
diff mbox series

Patch

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;