From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: Jesper Juhl <jesperjuhl76@gmail.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Jonathan Hunter <jonathanh@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH] Don't test for NULL firmware before releasing
Date: Thu, 16 Feb 2023 14:19:34 +0100 [thread overview]
Message-ID: <20230216131934.GF2849548@linux.intel.com> (raw)
In-Reply-To: <1af763de-dbb8-a6f8-1a8a-2d76610d8776@gmail.com>
Hi
On Thu, Feb 16, 2023 at 02:37:15AM +0100, Jesper Juhl wrote:
> From 4fe34831e2e7677b1c9616356f0a2e0a36ec092f Mon Sep 17 00:00:00 2001
> From: Jesper Juhl <jesperjuhl76@gmail.com>
> Date: Thu, 16 Feb 2023 02:33:05 +0100
> Subject: [PATCH] Don't test for NULL firmware before releasing
>
> release_firmware() tests for a NULL pointer itself, no need to do it up-front.
>
> Signed-off-by: Jesper Juhl <jesperjuhl76@gmail.com>
>
> ---
> drivers/gpu/drm/tegra/falcon.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/tegra/falcon.c b/drivers/gpu/drm/tegra/falcon.c
> index c0d85463eb1a..ae599441f031 100644
> --- a/drivers/gpu/drm/tegra/falcon.c
> +++ b/drivers/gpu/drm/tegra/falcon.c
> @@ -153,8 +153,7 @@ int falcon_init(struct falcon *falcon)
>
> void falcon_exit(struct falcon *falcon)
> {
> - if (falcon->firmware.firmware)
> - release_firmware(falcon->firmware.firmware);
> + release_firmware(falcon->firmware.firmware);
Please check patches with checkpatch.pl before posting.
Regards
Stanislaw
next prev parent reply other threads:[~2023-02-16 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 1:37 [PATCH] Don't test for NULL firmware before releasing Jesper Juhl
2023-02-16 13:19 ` Stanislaw Gruszka [this message]
2023-02-17 12:04 ` Mikko Perttunen
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=20230216131934.GF2849548@linux.intel.com \
--to=stanislaw.gruszka@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesperjuhl76@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.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