From: Sumit Garg <sumit.garg@kernel.org>
To: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
linux-arm-msm@vger.kernel.org, op-tee@lists.trustedfirmware.org,
linux-kernel@vger.kernel.org,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH] tee: qcom: initialize result before use in release worker
Date: Tue, 11 Nov 2025 12:18:27 +0530 [thread overview]
Message-ID: <aRLcO7dveqChPNb0@sumit-X1> (raw)
In-Reply-To: <20251110-qcom-tee-fix-warning-v1-1-d962f99f385d@oss.qualcomm.com>
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>
>
WARNING: multiple messages have this Message-ID (diff)
From: Sumit Garg via OP-TEE <op-tee@lists.trustedfirmware.org>
To: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Cc: linux-arm-msm@vger.kernel.org, op-tee@lists.trustedfirmware.org,
linux-kernel@vger.kernel.org,
Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH] tee: qcom: initialize result before use in release worker
Date: Tue, 11 Nov 2025 12:18:27 +0530 [thread overview]
Message-ID: <aRLcO7dveqChPNb0@sumit-X1> (raw)
In-Reply-To: <20251110-qcom-tee-fix-warning-v1-1-d962f99f385d@oss.qualcomm.com>
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>
>
next prev parent reply other threads:[~2025-11-11 6:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 21:28 [PATCH] tee: qcom: initialize result before use in release worker Amirreza Zarrabi
2025-11-10 21:28 ` Amirreza Zarrabi via OP-TEE
2025-11-11 6:48 ` Sumit Garg [this message]
2025-11-11 6:48 ` Sumit Garg via OP-TEE
2025-11-11 19:42 ` Amirreza Zarrabi
2025-11-11 19:42 ` Amirreza Zarrabi via OP-TEE
2025-11-12 7:47 ` Sumit Garg
2025-11-12 7:47 ` Sumit Garg via OP-TEE
2025-11-14 1:54 ` Amirreza Zarrabi
2025-11-14 1:54 ` Amirreza Zarrabi via OP-TEE
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=aRLcO7dveqChPNb0@sumit-X1 \
--to=sumit.garg@kernel.org \
--cc=amirreza.zarrabi@oss.qualcomm.com \
--cc=dan.carpenter@linaro.org \
--cc=jens.wiklander@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.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.