linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: heliang <windhl@126.com>
To: ldewangan@nvidia.com, gregkh@linuxfoundation.org,
	jirislaby@kernel.org, thierry.reding@gmail.com,
	jonathanh@nvidia.com, p.zabel@pengutronix.de,
	sumit.semwal@linaro.org, christian.koenig@amd.com
Cc: linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org, windhl@126.com
Subject: [PATCH] drivers: tty: serial: Add missing of_node_put() in serial-tegra.c
Date: Wed, 15 Jun 2022 18:48:33 +0800	[thread overview]
Message-ID: <20220615104833.3963552-1-windhl@126.com> (raw)

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


             reply	other threads:[~2022-06-15 12:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 10:48 heliang [this message]
2022-06-15 10:53 ` [PATCH] drivers: tty: serial: Add missing of_node_put() in serial-tegra.c 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
  -- strict thread matches above, loose matches on Subject: below --
2022-06-15 11:17 Liang He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220615104833.3963552-1-windhl@126.com \
    --to=windhl@126.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sumit.semwal@linaro.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).