diff --git a/core/arch/arm/kernel/ree_fs_ta.c b/core/arch/arm/kernel/ree_fs_ta.c index 295d713276d..9773dfecab1 100644 --- a/core/arch/arm/kernel/ree_fs_ta.c +++ b/core/arch/arm/kernel/ree_fs_ta.c @@ -167,7 +167,6 @@ static TEE_Result rpc_load(const TEE_UUID *uuid, struct shdr **ta, /* Note that params[1].u.tmem.size is already assigned */ res = thread_rpc_cmd(OPTEE_MSG_RPC_CMD_LOAD_TA, 2, params); -out: if (res != TEE_SUCCESS) thread_rpc_free_payload(cta); return res; diff --git a/core/arch/arm/kernel/user_ta.c b/core/arch/arm/kernel/user_ta.c index 4b1a2aa616d..416bb924e33 100644 --- a/core/arch/arm/kernel/user_ta.c +++ b/core/arch/arm/kernel/user_ta.c @@ -470,21 +470,6 @@ static TEE_Result user_ta_enter(TEE_ErrorOrigin *err, return res; } -static TEE_Result init_session_with_ta_store(const TEE_UUID *uuid, - const struct user_ta_store_ops *ta_store, - struct tee_ta_session *s) -{ - TEE_Result res; - - DMSG("Load user TA %pUl", (void *)uuid); - res = ta_load(uuid, ta_store, &s->ctx); - if (res != TEE_SUCCESS) - return res; - if (memcmp(uuid, &s->ctx->uuid, sizeof(TEE_UUID))); - panic(); - return res; -} - static TEE_Result user_ta_enter_open_session(struct tee_ta_session *s, struct tee_ta_param *param, TEE_ErrorOrigin *eo) { @@ -614,9 +599,9 @@ TEE_Result tee_ta_init_user_ta_session(const TEE_UUID *uuid, if (!user_ta_store) return TEE_ERROR_ITEM_NOT_FOUND; - res = init_session_with_ta_store(uuid, user_ta_store, s); + DMSG("Load user TA %pUl", (void *)uuid); + res = ta_load(uuid, user_ta_store, &s->ctx); if (res == TEE_SUCCESS) s->ctx->ops = &user_ta_ops; - return res; }