diff options
author | Dongliang Mu <mudongliangabcd@gmail.com> | 2022-03-16 14:50:47 +0100 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2022-04-05 08:56:26 +0200 |
commit | b5e22886839ae466fcf03295150094516c0fd8eb (patch) | |
tree | b2c466d037d404c615321d2c7c8bdce849cac102 /drivers/tee | |
parent | Linux 5.18-rc1 (diff) | |
download | linux-b5e22886839ae466fcf03295150094516c0fd8eb.tar.xz linux-b5e22886839ae466fcf03295150094516c0fd8eb.zip |
tee: optee: add missing mutext_destroy in optee_ffa_probe
The error handling code of optee_ffa_probe misses the mutex_destroy of
ffa.mutex when mutext_init succeeds.
Fix this by adding mutex_destory of ffa.mutex at the error handling part
Fixes: aceeafefff73 ("optee: use driver internal tee_context for some rpc")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r-- | drivers/tee/optee/ffa_abi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index a5eb4ef46971..c9b3b2cfb2b2 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -865,6 +865,7 @@ err_rhashtable_free: rhashtable_free_and_destroy(&optee->ffa.global_ids, rh_free_fn, NULL); optee_supp_uninit(&optee->supp); mutex_destroy(&optee->call_queue.mutex); + mutex_destroy(&optee->ffa.mutex); err_unreg_supp_teedev: tee_device_unregister(optee->supp_teedev); err_unreg_teedev: |