diff options
author | Liang He <windhl@126.com> | 2022-06-20 09:59:04 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-09-05 10:28:26 +0300 |
commit | cd772e659da0ad67f19f022f65449e14ebcf1284 (patch) | |
tree | 1f18cc649dae37395ed7625c761964798d42b0f6 /arch/powerpc/platforms | |
parent | 1c754b49c002a965004b6a96d158f7ce554eb977 (diff) | |
download | linux-cd772e659da0ad67f19f022f65449e14ebcf1284.tar.xz |
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: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220620065904.4071787-1-windhl@126.com
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/ls_uart.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c index 0133e175a0fc..4ecbc55b37c0 100644 --- a/arch/powerpc/platforms/embedded6xx/ls_uart.c +++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c @@ -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; |