lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230216131934.GF2849548@linux.intel.com>
Date:   Thu, 16 Feb 2023 14:19:34 +0100
From:   Stanislaw Gruszka <stanislaw.gruszka@...ux.intel.com>
To:     Jesper Juhl <jesperjuhl76@...il.com>
Cc:     linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        Jonathan Hunter <jonathanh@...dia.com>,
        Thierry Reding <thierry.reding@...il.com>,
        linux-tegra@...r.kernel.org
Subject: Re: [PATCH] Don't test for NULL firmware before releasing

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@...il.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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ