From: Sumit Garg <sumit.garg@kernel.org>
To: op-tee@lists.trustedfirmware.org
Subject: Re: [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware()
Date: Thu, 24 Apr 2025 10:23:55 +0530 [thread overview]
Message-ID: <aAnD4_WXl8gE2bGv@sumit-X1> (raw)
In-Reply-To: <20250410075635.3558712-1-nichen@iscas.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 839 bytes --]
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@iscas.ac.cn>
> ---
> drivers/tee/optee/smc_abi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by: Sumit Garg <sumit.garg@oss.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
>
WARNING: multiple messages have this Message-ID (diff)
From: Sumit Garg <sumit.garg@kernel.org>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: jens.wiklander@linaro.org, op-tee@lists.trustedfirmware.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware()
Date: Thu, 24 Apr 2025 10:23:55 +0530 [thread overview]
Message-ID: <aAnD4_WXl8gE2bGv@sumit-X1> (raw)
In-Reply-To: <20250410075635.3558712-1-nichen@iscas.ac.cn>
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@iscas.ac.cn>
> ---
> drivers/tee/optee/smc_abi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by: Sumit Garg <sumit.garg@oss.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
>
next prev parent reply other threads:[~2025-04-24 4:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 7:56 [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware() Chen Ni
2025-04-10 7:56 ` Chen Ni
2025-04-24 4:53 ` Sumit Garg [this message]
2025-04-24 4:53 ` Sumit Garg
2025-04-28 5:36 ` Jens Wiklander
2025-04-28 5:36 ` Jens Wiklander
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=aAnD4_WXl8gE2bGv@sumit-X1 \
--to=sumit.garg@kernel.org \
--cc=op-tee@lists.trustedfirmware.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.