efi_loader: Extra checks while opening an OPTEE session
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Wed, 23 Dec 2020 11:25:00 +0000 (13:25 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 26 Dec 2020 11:47:46 +0000 (12:47 +0100)
commit548fb67eef14f83d60310193415ac9d06a3bd286
treedf843f404c41455e20eea1c5847b50302c0f4d26
parentfbc326244ce6fb3bd42353f343a511b512b8e710
efi_loader: Extra checks while opening an OPTEE session

When opening an OP-TEE session we need to check the internal return
value of OP-TEE call arguments as well the return code of the
function itself.
The code was also ignoring to close the OP-TEE session in case the
shared memory registration failed.

Fixes: f042e47e8fb43 ("efi_loader: Implement EFI variable handling via OP-TEE")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_variable_tee.c