Skip to content

Commit b5e2288

Browse files
mudongliangjenswi-linaro
authored andcommitted
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: aceeafe ("optee: use driver internal tee_context for some rpc") Signed-off-by: Dongliang Mu <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
1 parent 3123109 commit b5e2288

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/tee/optee/ffa_abi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
865865
rhashtable_free_and_destroy(&optee->ffa.global_ids, rh_free_fn, NULL);
866866
optee_supp_uninit(&optee->supp);
867867
mutex_destroy(&optee->call_queue.mutex);
868+
mutex_destroy(&optee->ffa.mutex);
868869
err_unreg_supp_teedev:
869870
tee_device_unregister(optee->supp_teedev);
870871
err_unreg_teedev:

0 commit comments

Comments
 (0)