Skip to contentSkip to conversation

powerpc: fsl: gtm: Remove of_node_get() in fsl_gtm_init()

PATCH New Liang He 1 participant 1 message Jul 4, 2022 PowerPC

lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 powerpc: fsl: gtm: Remove of_node_get() in fsl_gtm_init()

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.

---
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(-)
arch/powerpc/sysdev/fsl_gtm.c +0 -1
index 39186ad6b3c3..e13ebd2be416 100644
@@ -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:
Signature · 1 line
2.25.1