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: <aAnD4_WXl8gE2bGv@sumit-X1>
Date: Thu, 24 Apr 2025 10:23:55 +0530
From: Sumit Garg <sumit.garg@...nel.org>
To: Chen Ni <nichen@...as.ac.cn>
Cc: jens.wiklander@...aro.org, op-tee@...ts.trustedfirmware.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tee: optee: smc: remove unnecessary NULL check before
 release_firmware()

On Thu, Apr 10, 2025 at 03:56:35PM +0800, Chen Ni wrote:
> release_firmware() checks for NULL pointers internally.
> Remove unneeded NULL check for fmw here.
> 
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> ---
>  drivers/tee/optee/smc_abi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Sumit Garg <sumit.garg@....qualcomm.com>

-Sumit

> 
> diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
> index f0c3ac1103bb..26f8f7bbbe56 100644
> --- a/drivers/tee/optee/smc_abi.c
> +++ b/drivers/tee/optee/smc_abi.c
> @@ -1551,8 +1551,7 @@ static int optee_load_fw(struct platform_device *pdev,
>  		  data_pa_high, data_pa_low, 0, 0, 0, &res);
>  	if (!rc)
>  		rc = res.a0;
> -	if (fw)
> -		release_firmware(fw);
> +	release_firmware(fw);
>  	kfree(data_buf);
>  
>  	if (!rc) {
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ