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] [day] [month] [year] [list]
Message-ID: <414c8bf5-f2ce-e042-05ff-0e463ab2613f@gentoo.org>
Date:   Mon, 21 Nov 2022 21:25:48 +0100
From:   zzam@...too.org
To:     cgel.zte@...il.com
Cc:     mchehab@...nel.org, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] [media] si2165: Remove redundant NULL check before
 release_firmware() call

Am 06.06.22 um 03:44 schrieb cgel.zte@...il.com:
> From: Minghao Chi <chi.minghao@....com.cn>
> 
> release_firmware() checks for NULL pointers internally so checking
> before calling it is redundant.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
> ---
>   drivers/media/dvb-frontends/si2165.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c
> index ebee230afb7b..3d167ca670a4 100644
> --- a/drivers/media/dvb-frontends/si2165.c
> +++ b/drivers/media/dvb-frontends/si2165.c
> @@ -513,10 +513,8 @@ static int si2165_upload_firmware(struct si2165_state *state)
>   	ret = 0;
>   	state->firmware_loaded = true;
>   error:
> -	if (fw) {
> -		release_firmware(fw);
> -		fw = NULL;
> -	}
> +	release_firmware(fw);
> +	fw = NULL;
>   
>   	return ret;
>   }

Acked-by: Matthias Schwarzott <zzam@...too.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ