diff --git a/arch/arm64/src/common/arm64_mmu.c b/arch/arm64/src/common/arm64_mmu.c index 18476049fe..294845d860 100644 --- a/arch/arm64/src/common/arm64_mmu.c +++ b/arch/arm64/src/common/arm64_mmu.c @@ -336,7 +336,7 @@ static void set_pte_block_desc(uint64_t *pte, uint64_t addr_pa, { /* Make Normal RW memory as execute never */ - if ((attrs & MT_RW) || (attrs & MT_EXECUTE_NEVER)) + if (attrs & MT_EXECUTE_NEVER) { desc |= PTE_BLOCK_DESC_PXN; }