Skip to content

Commit

Permalink
serial: ucc_uart: Add of_node_put() in ucc_uart_remove()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liang He authored and Greg Kroah-Hartman committed Jan 19, 2023
1 parent 2aaa43c commit 6e05467
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/tty/serial/ucc_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6e05467

Please sign in to comment.