* [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware()
@ 2025-04-10 7:56 ` Chen Ni
0 siblings, 0 replies; 6+ messages in thread
From: Chen Ni @ 2025-04-10 7:56 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 668 bytes --]
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(-)
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware()
@ 2025-04-10 7:56 ` Chen Ni
0 siblings, 0 replies; 6+ messages in thread
From: Chen Ni @ 2025-04-10 7:56 UTC (permalink / raw)
To: jens.wiklander, sumit.garg; +Cc: op-tee, linux-kernel, Chen Ni
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(-)
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware()
2025-04-10 7:56 ` Chen Ni
@ 2025-04-24 4:53 ` Sumit Garg
-1 siblings, 0 replies; 6+ messages in thread
From: Sumit Garg @ 2025-04-24 4:53 UTC (permalink / raw)
To: op-tee
[-- 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware()
@ 2025-04-24 4:53 ` Sumit Garg
0 siblings, 0 replies; 6+ messages in thread
From: Sumit Garg @ 2025-04-24 4:53 UTC (permalink / raw)
To: Chen Ni; +Cc: jens.wiklander, op-tee, linux-kernel
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware()
2025-04-24 4:53 ` Sumit Garg
@ 2025-04-28 5:36 ` Jens Wiklander
-1 siblings, 0 replies; 6+ messages in thread
From: Jens Wiklander @ 2025-04-28 5:36 UTC (permalink / raw)
To: op-tee
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
On Thu, Apr 24, 2025 at 6:54 AM Sumit Garg <sumit.garg@kernel.org> wrote:
>
> 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>
I'm picking up this.
Thanks,
Jens
>
> -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
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tee: optee: smc: remove unnecessary NULL check before release_firmware()
@ 2025-04-28 5:36 ` Jens Wiklander
0 siblings, 0 replies; 6+ messages in thread
From: Jens Wiklander @ 2025-04-28 5:36 UTC (permalink / raw)
To: Sumit Garg; +Cc: Chen Ni, op-tee, linux-kernel
On Thu, Apr 24, 2025 at 6:54 AM Sumit Garg <sumit.garg@kernel.org> wrote:
>
> 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>
I'm picking up this.
Thanks,
Jens
>
> -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
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-28 5:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-04-24 4:53 ` Sumit Garg
2025-04-28 5:36 ` Jens Wiklander
2025-04-28 5:36 ` Jens Wiklander
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.