All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch: arm: mach-keystone: Add missing of_node_put() in pm_domain.c
@ 2022-06-15  9:36 ` heliang
  0 siblings, 0 replies; 2+ messages in thread
From: heliang @ 2022-06-15  9:36 UTC (permalink / raw)
  To: nm, ssantosh, linux; +Cc: linux-arm-kernel, linux-kernel, windhl

In keystone_pm_runtime_init(), of_find_matching_node() will return a
node pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.

Signed-off-by: heliang <windhl@126.com>
---
 arch/arm/mach-keystone/pm_domain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-keystone/pm_domain.c b/arch/arm/mach-keystone/pm_domain.c
index 5eea01cbecf0..50a08721a8d8 100644
--- a/arch/arm/mach-keystone/pm_domain.c
+++ b/arch/arm/mach-keystone/pm_domain.c
@@ -44,6 +44,8 @@ int __init keystone_pm_runtime_init(void)
 	if (!np)
 		return 0;
 
+	of_node_put(np);
+
 	pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);
 
 	return 0;
-- 
2.25.1


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

* [PATCH] arch: arm: mach-keystone: Add missing of_node_put() in pm_domain.c
@ 2022-06-15  9:36 ` heliang
  0 siblings, 0 replies; 2+ messages in thread
From: heliang @ 2022-06-15  9:36 UTC (permalink / raw)
  To: nm, ssantosh, linux; +Cc: linux-arm-kernel, linux-kernel, windhl

In keystone_pm_runtime_init(), of_find_matching_node() will return a
node pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.

Signed-off-by: heliang <windhl@126.com>
---
 arch/arm/mach-keystone/pm_domain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-keystone/pm_domain.c b/arch/arm/mach-keystone/pm_domain.c
index 5eea01cbecf0..50a08721a8d8 100644
--- a/arch/arm/mach-keystone/pm_domain.c
+++ b/arch/arm/mach-keystone/pm_domain.c
@@ -44,6 +44,8 @@ int __init keystone_pm_runtime_init(void)
 	if (!np)
 		return 0;
 
+	of_node_put(np);
+
 	pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);
 
 	return 0;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-06-15  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15  9:36 [PATCH] arch: arm: mach-keystone: Add missing of_node_put() in pm_domain.c heliang
2022-06-15  9:36 ` heliang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.