Commit e19d7f7e authored by Amirreza Zarrabi's avatar Amirreza Zarrabi Committed by Jens Wiklander
Browse files

tee: qcomtee: initialize result before use in release worker



Initialize result to 0 so the error path doesn't read it
uninitialized when the invoke fails. Fixes a Smatch warning.

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/op-tee/7c1e0de2-7d42-4c6b-92fe-0e4fe5d650b5@oss.qualcomm.com/


Fixes: d6e29083 ("tee: add Qualcomm TEE driver")
Signed-off-by: default avatarAmirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Reviewed-by: default avatarSumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
parent ac5ae0a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 } };