diff --git a/core/arch/arm/mm/tee_mmu.c b/core/arch/arm/mm/tee_mmu.c index af1c8670a01..dc666c67a4b 100644 --- a/core/arch/arm/mm/tee_mmu.c +++ b/core/arch/arm/mm/tee_mmu.c @@ -676,6 +676,9 @@ void tee_mmu_rem_rwmem(struct user_ta_ctx *utc, struct mobj *mobj, vaddr_t va) */ void tee_mmu_final(struct user_ta_ctx *utc) { + if (!utc->mmu) + return; + /* clear MMU entries to avoid clash when asid is reused */ tlbi_asid(utc->mmu->asid);