linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: tty: serial: Add missing of_node_put() in serial-tegra.c
@ 2022-06-15 10:48 heliang
  2022-06-15 10:53 ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: heliang @ 2022-06-15 10:48 UTC (permalink / raw)
  To: ldewangan, gregkh, jirislaby, thierry.reding, jonathanh, p.zabel,
	sumit.semwal, christian.koenig
  Cc: linux-serial, linux-tegra, linux-media, dri-devel, linaro-mm-sig,
	windhl

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: heliang <windhl@126.com>
---
 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 d942ab152f5a..5c4850a3762c 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.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-06-16  9:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-15 10:48 [PATCH] drivers: tty: serial: Add missing of_node_put() in serial-tegra.c heliang
2022-06-15 10:53 ` Greg KH
2022-06-15 20:23   ` [Linaro-mm-sig] " Dave Airlie
2022-06-15 20:30     ` Daniel Vetter
2022-06-16  8:43       ` Greg KH
2022-06-16  8:52         ` Liang He
2022-06-16  9:20           ` Conor.Dooley
2022-06-16  9:39             ` Liang He
2022-06-16  9:43               ` Conor.Dooley
2022-06-16  8:42     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).