diff options
author | Liang He <windhl@126.com> | 2022-12-05 16:54:37 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-19 15:51:09 +0100 |
commit | 6e054678ff5c10840ce801dfdb2d4898decb2b63 (patch) | |
tree | 39e9aa6b3bdf27e47b42fbb31e0a7e1dfe8128e4 /drivers/tty/serial/ucc_uart.c | |
parent | 2aaa43c7077833301c237684cd7bc9ae5e3dec95 (diff) | |
download | linux-stable-6e054678ff5c10840ce801dfdb2d4898decb2b63.tar.gz linux-stable-6e054678ff5c10840ce801dfdb2d4898decb2b63.tar.bz2 linux-stable-6e054678ff5c10840ce801dfdb2d4898decb2b63.zip |
serial: ucc_uart: Add of_node_put() in ucc_uart_remove()
In ucc_uart_probe(), we have added proper of_node_put() in the failure
paths. However, we miss it before we free *qe_port* in the remove() function.
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20221205085437.1163682-1-windhl@126.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/ucc_uart.c')
-rw-r--r-- | drivers/tty/serial/ucc_uart.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index b09b6496ee3e..32c7a5b43f8e 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c @@ -1468,6 +1468,8 @@ static int ucc_uart_remove(struct platform_device *ofdev) uart_remove_one_port(&ucc_uart_driver, &qe_port->port); + of_node_put(qe_port->np); + kfree(qe_port); return 0; |