Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@kernel.org>
To: Felix Gu <ustc.gu@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	 Mikko Perttunen <mperttunen@nvidia.com>,
	David Airlie <airlied@gmail.com>,
	 Simona Vetter <simona@ffwll.ch>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	 Thierry Reding <treding@nvidia.com>,
	dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/tegra: dc: Fix device node reference leak in tegra_dc_has_output()
Date: Thu, 28 May 2026 16:20:37 +0200	[thread overview]
Message-ID: <ahhPH___c7pTjYUZ@orome> (raw)
In-Reply-To: <20260128-dc-v1-1-a88205826301@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

On Wed, Jan 28, 2026 at 12:43:10AM +0800, Felix Gu wrote:
> The of_for_each_phandle() macro increments the reference count of the
> device node it iterates over. If the loop exits early, the reference must
> be released manually.
> 
> In tegra_dc_has_output(), the function returns true immediately when a
> match is found, failing to release the current node's reference.
> 
> Fix this by adding a call to of_node_put() before returning from the loop.
> 
> Fixes: c57997bce423 ("drm/tegra: sor: Add Tegra186 support")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/gpu/drm/tegra/dc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Sorry for missing this earlier. Applied now, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2026-05-28 14:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 16:43 [PATCH] drm/tegra: dc: Fix device node reference leak in tegra_dc_has_output() Felix Gu
2026-02-06  3:53 ` Mikko Perttunen
2026-05-28 14:20 ` Thierry Reding [this message]

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=ahhPH___c7pTjYUZ@orome \
    --to=thierry.reding@kernel.org \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@gmail.com \
    --cc=treding@nvidia.com \
    --cc=ustc.gu@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