summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/serial-tegra.c
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-06-15 14:17:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 15:36:02 +0300
commiteb01611056cf835cf2c1cc1a800bfff9386c82ea (patch)
tree0085a5bad5e547ed7797005578ef58a5e6ea79ed /drivers/tty/serial/serial-tegra.c
parentf9008285bb69e4713918a665250ab2d356b731ba (diff)
downloadlinux-eb01611056cf835cf2c1cc1a800bfff9386c82ea.tar.xz
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>
Diffstat (limited to 'drivers/tty/serial/serial-tegra.c')
-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)