DORMANTno replies

[PATCH] powerpc: fsl: gtm: Remove of_node_get() in fsl_gtm_init()

From: Liang He <hidden>
Date: 2022-07-04 14:48:27
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

for_each_compatible_node() will automaitically increase and decrease
the refcount of the device_node object. There is no need to call
additional of_node_get(). It is better to keep the original meaning
of refcounting as there is no any new reference created.

Signed-off-by: Liang He <redacted>
---
 I do not understand the whole story of the gtm, so maybe we want to
keep the object always alive by using additional refcounting. Please
check it carefully.


 arch/powerpc/sysdev/fsl_gtm.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/sysdev/fsl_gtm.c b/arch/powerpc/sysdev/fsl_gtm.c
index 39186ad6b3c3..e13ebd2be416 100644
--- a/arch/powerpc/sysdev/fsl_gtm.c
+++ b/arch/powerpc/sysdev/fsl_gtm.c
@@ -423,7 +423,6 @@ static int __init fsl_gtm_init(void)
 
 		/* We don't want to lose the node and its ->data */
 		np->data = gtm;
-		of_node_get(np);
 
 		continue;
 err:
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help