aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-06-15 19:17:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 14:36:02 +0200
commiteb01611056cf835cf2c1cc1a800bfff9386c82ea (patch)
tree0085a5bad5e547ed7797005578ef58a5e6ea79ed
parentserial: Drop timeout from uart_port (diff)
downloadlinux-dev-eb01611056cf835cf2c1cc1a800bfff9386c82ea.tar.xz
linux-dev-eb01611056cf835cf2c1cc1a800bfff9386c82ea.zip
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 <windhl@126.com> Link: https://lore.kernel.org/r/20220615111747.3963930-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/serial-tegra.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 101fb585e6f9..ad4f3567ff90 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)