* [PATCH] tee: qcom: initialize result before use in release worker
@ 2025-11-10 21:28 Amirreza Zarrabi
2025-11-11 6:48 ` Sumit Garg
0 siblings, 1 reply; 5+ messages in thread
From: Amirreza Zarrabi @ 2025-11-10 21:28 UTC (permalink / raw)
To: Jens Wiklander, Sumit Garg
Cc: linux-arm-msm, op-tee, linux-kernel, Dan Carpenter,
Amirreza Zarrabi
Initialize result to 0 so the error path doesn't read it
uninitialized when the invoke fails. Fixes a Smatch warning.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/op-tee/7c1e0de2-7d42-4c6b-92fe-0e4fe5d650b5@oss.qualcomm.com/
Fixes: d6e290837e50 ("tee: add Qualcomm TEE driver")
Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
---
drivers/tee/qcomtee/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tee/qcomtee/core.c b/drivers/tee/qcomtee/core.c
index b6715ada7700..ecd04403591c 100644
--- a/drivers/tee/qcomtee/core.c
+++ b/drivers/tee/qcomtee/core.c
@@ -82,7 +82,7 @@ static void qcomtee_do_release_qtee_object(struct work_struct *work)
{
struct qcomtee_object *object;
struct qcomtee *qcomtee;
- int ret, result;
+ int ret, result = 0;
/* RELEASE does not require any argument. */
struct qcomtee_arg args[] = { { .type = QCOMTEE_ARG_TYPE_INV } };
---
base-commit: ab40c92c74c6b0c611c89516794502b3a3173966
change-id: 20251110-qcom-tee-fix-warning-3d58d74a22d8
Best regards,
--
Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] tee: qcom: initialize result before use in release worker
2025-11-10 21:28 [PATCH] tee: qcom: initialize result before use in release worker Amirreza Zarrabi
@ 2025-11-11 6:48 ` Sumit Garg
2025-11-11 19:42 ` Amirreza Zarrabi
0 siblings, 1 reply; 5+ messages in thread
From: Sumit Garg @ 2025-11-11 6:48 UTC (permalink / raw)
To: Amirreza Zarrabi
Cc: Jens Wiklander, linux-arm-msm, op-tee, linux-kernel,
Dan Carpenter
On Mon, Nov 10, 2025 at 01:28:32PM -0800, Amirreza Zarrabi wrote:
For the subject prefix lets try to follow the directory structure:
tee: qcomtee: ...
> Initialize result to 0 so the error path doesn't read it
> uninitialized when the invoke fails. Fixes a Smatch warning.
>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/op-tee/7c1e0de2-7d42-4c6b-92fe-0e4fe5d650b5@oss.qualcomm.com/
> Fixes: d6e290837e50 ("tee: add Qualcomm TEE driver")
> Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
> ---
> drivers/tee/qcomtee/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tee/qcomtee/core.c b/drivers/tee/qcomtee/core.c
> index b6715ada7700..ecd04403591c 100644
> --- a/drivers/tee/qcomtee/core.c
> +++ b/drivers/tee/qcomtee/core.c
> @@ -82,7 +82,7 @@ static void qcomtee_do_release_qtee_object(struct work_struct *work)
> {
> struct qcomtee_object *object;
> struct qcomtee *qcomtee;
> - int ret, result;
> + int ret, result = 0;
>
The change looks fine to me.
-Sumit
> /* RELEASE does not require any argument. */
> struct qcomtee_arg args[] = { { .type = QCOMTEE_ARG_TYPE_INV } };
>
> ---
> base-commit: ab40c92c74c6b0c611c89516794502b3a3173966
> change-id: 20251110-qcom-tee-fix-warning-3d58d74a22d8
>
> Best regards,
> --
> Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tee: qcom: initialize result before use in release worker
2025-11-11 6:48 ` Sumit Garg
@ 2025-11-11 19:42 ` Amirreza Zarrabi
2025-11-12 7:47 ` Sumit Garg
0 siblings, 1 reply; 5+ messages in thread
From: Amirreza Zarrabi @ 2025-11-11 19:42 UTC (permalink / raw)
To: Sumit Garg
Cc: Jens Wiklander, linux-arm-msm, op-tee, linux-kernel,
Dan Carpenter
Hi Sumit,
On 11/11/2025 5:48 PM, Sumit Garg wrote:
> On Mon, Nov 10, 2025 at 01:28:32PM -0800, Amirreza Zarrabi wrote:
>
> For the subject prefix lets try to follow the directory structure:
>
> tee: qcomtee: ...
>
I believe we previously agreed on using tee: qcom: based on the reviewer’s
comments. Currently, there’s no commit message with qcomtee:.
https://lore.kernel.org/op-tee/4rbfpubsaxgv2buksonfigbdkw6geas6l7pycxuukdymqfohga@ohd4hqzvra3w/
Best Regards,
Amir
>> Initialize result to 0 so the error path doesn't read it
>> uninitialized when the invoke fails. Fixes a Smatch warning.
>>
>> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
>> Closes: https://lore.kernel.org/op-tee/7c1e0de2-7d42-4c6b-92fe-0e4fe5d650b5@oss.qualcomm.com/
>> Fixes: d6e290837e50 ("tee: add Qualcomm TEE driver")
>> Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
>> ---
>> drivers/tee/qcomtee/core.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tee/qcomtee/core.c b/drivers/tee/qcomtee/core.c
>> index b6715ada7700..ecd04403591c 100644
>> --- a/drivers/tee/qcomtee/core.c
>> +++ b/drivers/tee/qcomtee/core.c
>> @@ -82,7 +82,7 @@ static void qcomtee_do_release_qtee_object(struct work_struct *work)
>> {
>> struct qcomtee_object *object;
>> struct qcomtee *qcomtee;
>> - int ret, result;
>> + int ret, result = 0;
>>
>
> The change looks fine to me.
>
> -Sumit
>
>> /* RELEASE does not require any argument. */
>> struct qcomtee_arg args[] = { { .type = QCOMTEE_ARG_TYPE_INV } };
>>
>> ---
>> base-commit: ab40c92c74c6b0c611c89516794502b3a3173966
>> change-id: 20251110-qcom-tee-fix-warning-3d58d74a22d8
>>
>> Best regards,
>> --
>> Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tee: qcom: initialize result before use in release worker
2025-11-11 19:42 ` Amirreza Zarrabi
@ 2025-11-12 7:47 ` Sumit Garg
2025-11-14 1:54 ` Amirreza Zarrabi
0 siblings, 1 reply; 5+ messages in thread
From: Sumit Garg @ 2025-11-12 7:47 UTC (permalink / raw)
To: Amirreza Zarrabi
Cc: Jens Wiklander, linux-arm-msm, op-tee, linux-kernel,
Dan Carpenter
On Wed, Nov 12, 2025 at 06:42:04AM +1100, Amirreza Zarrabi wrote:
> Hi Sumit,
>
> On 11/11/2025 5:48 PM, Sumit Garg wrote:
> > On Mon, Nov 10, 2025 at 01:28:32PM -0800, Amirreza Zarrabi wrote:
> >
> > For the subject prefix lets try to follow the directory structure:
> >
> > tee: qcomtee: ...
> >
>
> I believe we previously agreed on using tee: qcom: based on the reviewer’s
> comments. Currently, there’s no commit message with qcomtee:.
>
> https://lore.kernel.org/op-tee/4rbfpubsaxgv2buksonfigbdkw6geas6l7pycxuukdymqfohga@ohd4hqzvra3w/
>
Yeah I agree I haven't been too picky about it earlier but lets follow a
common practice which other TEEs also uses based on directory structure like:
- tee: optee:
- tee: amdtee:
- tee: tstee:
- tee: qcomtee:
-Sumit
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tee: qcom: initialize result before use in release worker
2025-11-12 7:47 ` Sumit Garg
@ 2025-11-14 1:54 ` Amirreza Zarrabi
0 siblings, 0 replies; 5+ messages in thread
From: Amirreza Zarrabi @ 2025-11-14 1:54 UTC (permalink / raw)
To: Sumit Garg
Cc: Jens Wiklander, linux-arm-msm, op-tee, linux-kernel,
Dan Carpenter
Hi Sumit,
On 11/12/2025 6:47 PM, Sumit Garg wrote:
> On Wed, Nov 12, 2025 at 06:42:04AM +1100, Amirreza Zarrabi wrote:
>> Hi Sumit,
>>
>> On 11/11/2025 5:48 PM, Sumit Garg wrote:
>>> On Mon, Nov 10, 2025 at 01:28:32PM -0800, Amirreza Zarrabi wrote:
>>>
>>> For the subject prefix lets try to follow the directory structure:
>>>
>>> tee: qcomtee: ...
>>>
>>
>> I believe we previously agreed on using tee: qcom: based on the reviewer’s
>> comments. Currently, there’s no commit message with qcomtee:.
>>
>> https://lore.kernel.org/op-tee/4rbfpubsaxgv2buksonfigbdkw6geas6l7pycxuukdymqfohga@ohd4hqzvra3w/
>>
>
> Yeah I agree I haven't been too picky about it earlier but lets follow a
> common practice which other TEEs also uses based on directory structure like:
>
> - tee: optee:
> - tee: amdtee:
> - tee: tstee:
> - tee: qcomtee:
>
> -Sumit
Sure. I'll update.
Regards,
Amir
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-14 1:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10 21:28 [PATCH] tee: qcom: initialize result before use in release worker Amirreza Zarrabi
2025-11-11 6:48 ` Sumit Garg
2025-11-11 19:42 ` Amirreza Zarrabi
2025-11-12 7:47 ` Sumit Garg
2025-11-14 1:54 ` Amirreza Zarrabi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).