Commit cd772e65 authored by Liang He's avatar Liang He Committed by Michael Ellerman

powerpc/embedded6xx/ls_uart: Add missing of_node_put()

In ls_uarts_init(), add an of_node_put() to keep refcount balance.
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220620065904.4071787-1-windhl@126.com
parent 1c754b49
...@@ -124,6 +124,8 @@ static int __init ls_uarts_init(void) ...@@ -124,6 +124,8 @@ static int __init ls_uarts_init(void)
avr_clock = *(u32*)of_get_property(avr, "clock-frequency", &len); avr_clock = *(u32*)of_get_property(avr, "clock-frequency", &len);
phys_addr = ((u32*)of_get_property(avr, "reg", &len))[0]; phys_addr = ((u32*)of_get_property(avr, "reg", &len))[0];
of_node_put(avr);
if (!avr_clock || !phys_addr) if (!avr_clock || !phys_addr)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment