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]
Date:   Mon, 6 Jun 2022 10:33:41 +0100
From:   Richard Fitzgerald <rf@...nsource.cirrus.com>
To:     <cgel.zte@...il.com>, <lgirdwood@...il.com>
CC:     <broonie@...nel.org>, <perex@...ex.cz>,
        <patches@...nsource.cirrus.com>, <alsa-devel@...a-project.org>,
        <linux-kernel@...r.kernel.org>,
        Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] ASoC: wm_adsp: Remove redundant NULL check before
 release_firmware() call

On 06/06/2022 02:39, cgel.zte@...il.com wrote:
> 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>
> ---
>   sound/soc/codecs/wm_adsp.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
> index 7973a75cac05..4c4344b21c2e 100644
> --- a/sound/soc/codecs/wm_adsp.c
> +++ b/sound/soc/codecs/wm_adsp.c
> @@ -739,12 +739,10 @@ static void wm_adsp_release_firmware_files(struct wm_adsp *dsp,
>   					   const struct firmware *coeff_firmware,
>   					   char *coeff_filename)
>   {
> -	if (wmfw_firmware)
> -		release_firmware(wmfw_firmware);
> +	release_firmware(wmfw_firmware);
>   	kfree(wmfw_filename);
>   
> -	if (coeff_firmware)
> -		release_firmware(coeff_firmware);
> +	release_firmware(coeff_firmware);
>   	kfree(coeff_filename);
>   }
>   
> 
Reviewed-by: Richard Fitzgerald <rf@...nsource.cirrus.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ