ARM: Alpine: add missing of_node_put call

Message ID 20221218131025.394179-1-martin@kaiser.cx
State New
Headers
Series ARM: Alpine: add missing of_node_put call |

Commit Message

Martin Kaiser Dec. 18, 2022, 1:10 p.m. UTC
  A node that is returned by of_find_compatible_node has its refcount
incremented. We have to call of_node_put when the node is no longer
needed.

Add a missing of_node_put call in function alpine_cpu_pm_init.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
compile-tested only, I don't have this hardware

 arch/arm/mach-alpine/alpine_cpu_pm.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/arch/arm/mach-alpine/alpine_cpu_pm.c b/arch/arm/mach-alpine/alpine_cpu_pm.c
index 13ae8412e9ce..fc5b9732ccb7 100644
--- a/arch/arm/mach-alpine/alpine_cpu_pm.c
+++ b/arch/arm/mach-alpine/alpine_cpu_pm.c
@@ -50,6 +50,7 @@  void __init alpine_cpu_pm_init(void)
 
 	np = of_find_compatible_node(NULL, NULL, "al,alpine-cpu-resume");
 	al_cpu_resume_regs = of_iomap(np, 0);
+	of_node_put(np);
 
 	wakeup_supported = !IS_ERR(al_sysfabric) && al_cpu_resume_regs;