We don't handle the OOM case in that code, so using xmemalign seems
like a better option.

Signed-off-by: Andrey Smirnov <andrew.smir...@gmail.com>
---
 arch/arm/cpu/mmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index 4090f7da9..9fbefa453 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -92,8 +92,8 @@ static u32 *arm_create_pte(unsigned long virt)
        u32 *table;
        int i;
 
-       table = memalign(PTRS_PER_PTE * sizeof(u32),
-                        PTRS_PER_PTE * sizeof(u32));
+       table = xmemalign(PTRS_PER_PTE * sizeof(u32),
+                         PTRS_PER_PTE * sizeof(u32));
 
        if (!ttb)
                arm_mmu_not_initialized_error();
-- 
2.17.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to