From: Thierry Reding <thierry.reding@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Mikko Perttunen <mperttunen@nvidia.com>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH] drm/tegra: Fix a strange error handling path
Date: Mon, 22 Jun 2026 08:49:19 +0200 [thread overview]
Message-ID: <ajjaW_fGdHWPZr9K@orome> (raw)
In-Reply-To: <308ea09281bd0b3fb0ec7e90e23012c0783f373c.1781983379.git.christophe.jaillet@wanadoo.fr>
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]
On Sat, Jun 20, 2026 at 09:23:14PM +0200, Christophe JAILLET wrote:
> The resource freed at the 'put_aux' label is "sor->aux->dev".
> However, this resource is taken after devm_tegra_pmc_get(), so there is no
> point to release it in this error handling path.
>
> This is harmless because put_device() will be called with a NULL pointer,
> but this is confusing.
>
> So, fix the logic and return directly.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only.
>
> This is not a bug, so no need for a Fixes tag.
> If needed anyway, it was introduced by commit e68c4244136b ("drm/tegra:
> Explicitly specify PMC instance to use")
> ---
> drivers/gpu/drm/tegra/sor.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Good catch! Looks like I used the put_aux label without realizing that
sor->aux isn't acquired until *after* sor->pmc here.
Thanks for fixing this,
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-06-22 6:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-20 19:23 [PATCH] drm/tegra: Fix a strange error handling path Christophe JAILLET
2026-06-20 19:33 ` sashiko-bot
2026-06-22 6:49 ` Thierry Reding [this message]
2026-06-22 6:50 ` Thierry Reding
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=ajjaW_fGdHWPZr9K@orome \
--to=thierry.reding@kernel.org \
--cc=airlied@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=simona@ffwll.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.