[PATCH] powerpc: fsl: gtm: Remove of_node_get() in fsl_gtm_init()
Liang He
windhl at 126.com
Tue Jul 5 00:46:35 AEST 2022
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 <windhl at 126.com>
---
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
More information about the Linuxppc-dev
mailing list