Skip to contentSkip to conversation

powerpc/embedded6xx/ls_uart: Add missing of_node_put()

PATCH Applied Liang He 2 participants 2 messages Jun 20, 2022 – Sep 9, 2022 PowerPC

lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 powerpc/embedded6xx/ls_uart: Add missing of_node_put()

In ls_uarts_init(), we need to add a of_node_put() to keep refcount balance.

---
 arch/powerpc/platforms/embedded6xx/ls_uart.c | 2 ++
 1 file changed, 2 insertions(+)
arch/powerpc/platforms/embedded6xx/ls_uart.c +2 -0
index 0133e175a0fc..4ecbc55b37c0 100644
@@ -124,6 +124,8 @@ static int __init ls_uarts_init(void)
 	avr_clock = *(u32*)of_get_property(avr, "clock-frequency", &len);
 	phys_addr = ((u32*)of_get_property(avr, "reg", &len))[0];
 
+	of_node_put(avr);
+
 	if (!avr_clock || !phys_addr)
 		return -EINVAL;
 
Signature · 1 line
2.25.1