* [PATCH] drivers: tty: serial: Add missing of_node_put() in serial-tegra.c
@ 2022-06-15 11:17 Liang He
0 siblings, 0 replies; 3+ messages in thread
From: Liang He @ 2022-06-15 11:17 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: Liang He <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] 3+ messages in thread
* Re: [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, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-06-15 10:53 UTC (permalink / raw)
To: heliang
Cc: ldewangan, jirislaby, thierry.reding, jonathanh, p.zabel,
sumit.semwal, christian.koenig, linux-serial, linux-tegra,
linux-media, dri-devel, linaro-mm-sig
On Wed, Jun 15, 2022 at 06:48:33PM +0800, heliang wrote:
> 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>
We need a real name please, one you sign documents with.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* [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; 3+ 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] 3+ messages in thread
end of thread, other threads:[~2022-06-15 12:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 11:17 [PATCH] drivers: tty: serial: Add missing of_node_put() in serial-tegra.c Liang He
-- strict thread matches above, loose matches on Subject: below --
2022-06-15 10:48 heliang
2022-06-15 10:53 ` 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).