aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/avb_verify.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/avb_verify.c b/common/avb_verify.c
index 0520a71..48ba8db 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -619,10 +619,11 @@ static int get_open_session(struct AvbOpsData *ops_data)
memset(&arg, 0, sizeof(arg));
tee_optee_ta_uuid_to_octets(arg.uuid, &uuid);
rc = tee_open_session(tee, &arg, 0, NULL);
- if (!rc) {
- ops_data->tee = tee;
- ops_data->session = arg.session;
- }
+ if (rc || arg.ret)
+ continue;
+
+ ops_data->tee = tee;
+ ops_data->session = arg.session;
}
return 0;