diff mbox series

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

Message ID 20220704144635.278394-1-windhl@126.com (mailing list archive)
State Rejected
Headers show
Series powerpc: fsl: gtm: Remove of_node_get() in fsl_gtm_init() | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_ppctests fail ppctests (ubuntu-20.04, ppc64le) failed at step build.
snowpatch_ozlabs/github-powerpc_selftests fail selftests (ubuntu-20.04, ppc64) failed at step build.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 7 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 23 jobs.

Commit Message

Liang He July 4, 2022, 2:46 p.m. UTC
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@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 mbox series

Patch

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: