author | Jens Wiklander <jens.wiklander@linaro.org> | 2019-08-22 05:44:06 (GMT) |
---|---|---|
committer | Chao Liu <chao.liu@amlogic.com> | 2019-08-23 03:26:46 (GMT) |
commit | bb77cc3ae660424272715d30a1ad3b7e27642c7d (patch) | |
tree | 4872ece0485c09994260e24c5e0ea9730473ea5c | |
parent | ccbdbc7cb510c6babab61b12fea0afd42f303e44 (diff) | |
download | tdk_linuxdriver-tdk-v2.4.4.zip tdk_linuxdriver-tdk-v2.4.4.tar.gz tdk_linuxdriver-tdk-v2.4.4.tar.bz2 |
optee: fix uninitialized symbol 'parg' [1/1]
PD#SWPL-8608
Problem:
** SYNC FROM linaro **
uninitialized symbol 'parg'.
Solution:
Fixes the static checker warning in optee_release().
Verify:
none
Change-Id: Idd3305534a88e6759d9af54a41dd6c6a931c1848
-rw-r--r-- | optee/core.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/optee/core.c b/optee/core.c index 5295c75..7202489 100644 --- a/optee/core.c +++ b/optee/core.c @@ -228,13 +228,14 @@ static void optee_release(struct tee_context *ctx) if (!IS_ERR(shm)) { arg = tee_shm_get_va(shm, 0); /* - * If va2pa fails for some reason, we can't call - * optee_close_session(), only free the memory. Secure OS - * will leak sessions and finally refuse more sessions, but - * we will at least let normal world reclaim its memory. + * If va2pa fails for some reason, we can't call into + * secure world, only free the memory. Secure OS will leak + * sessions and finally refuse more sessions, but we will + * at least let normal world reclaim its memory. */ 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, |