Skip to content
Commit 9b87d442 authored by Ilias Apalodimas's avatar Ilias Apalodimas Committed by Heinrich Schuchardt
Browse files

efi_loader: Check for the native OP-TEE result on mm_communicate calls



Currently we only check for the return value of tee_invoke_func().
Although OP-TEE and StMM will correctly set param[1].u.value.a and we'll
eventually return an error, the correct thing to do is check for the
OP_TEE return code as well.
So let's check for that and move tee_shm_free() and tee_close_session()
before exiting with an error to make sure we always clear the registered
memory.

Fixes: f042e47e ("efi_loader: Implement EFI variable handling via OP-TEE")
Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
Use EFI_DEVICE_ERROR for TEE communication problems.
Reviewed-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent 5d1f79ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment