mm/pmm: Fix align_entry() checking pointer instead of value
diff --git a/common/mm/pmm.s2.c b/common/mm/pmm.s2.c
index aced997f..b17b45d0 100644
--- a/common/mm/pmm.s2.c
+++ b/common/mm/pmm.s2.c
@@ -111,7 +111,7 @@ static bool align_entry(uint64_t *base, uint64_t *length) {
*length -= (*base - orig_base);
*length = ALIGN_DOWN(*length, PAGE_SIZE);
- if (!length)
+ if (*length == 0)
return false;
return true;
