提交 efb14036 编写于 作者: J Jens Wiklander

tee: optee: fix uninitialized symbol 'parg'

Fixes the static checker warning in optee_release().
error: uninitialized symbol 'parg'.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org>
上级 16f73eb0
...@@ -224,13 +224,14 @@ static void optee_release(struct tee_context *ctx) ...@@ -224,13 +224,14 @@ static void optee_release(struct tee_context *ctx)
if (!IS_ERR(shm)) { if (!IS_ERR(shm)) {
arg = tee_shm_get_va(shm, 0); arg = tee_shm_get_va(shm, 0);
/* /*
* If va2pa fails for some reason, we can't call * If va2pa fails for some reason, we can't call into
* optee_close_session(), only free the memory. Secure OS * secure world, only free the memory. Secure OS will leak
* will leak sessions and finally refuse more sessions, but * sessions and finally refuse more sessions, but we will
* we will at least let normal world reclaim its memory. * at least let normal world reclaim its memory.
*/ */
if (!IS_ERR(arg)) if (!IS_ERR(arg))
tee_shm_va2pa(shm, arg, &parg); if (tee_shm_va2pa(shm, arg, &parg))
arg = NULL; /* prevent usage of parg below */
} }
list_for_each_entry_safe(sess, sess_tmp, &ctxdata->sess_list, list_for_each_entry_safe(sess, sess_tmp, &ctxdata->sess_list,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册