From b7ea93607ab3dcaf389379af11d0b1c539c7b3f9 Mon Sep 17 00:00:00 2001 From: Liang He Date: Wed, 15 Jun 2022 19:17:47 +0800 Subject: [PATCH] drivers: tty: serial: Add missing of_node_put() in serial-tegra.c In tegra_uart_init(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220615111747.3963930-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/serial-tegra.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c index 101fb585e6f9a..ad4f3567ff906 100644 --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c @@ -1667,6 +1667,7 @@ static int __init tegra_uart_init(void) node = of_find_matching_node(NULL, tegra_uart_of_match); if (node) match = of_match_node(tegra_uart_of_match, node); + of_node_put(node); if (match) cdata = match->data; if (cdata) -- 2.39.5