author: Peng Fan <peng.fan@nxp.com> 2021-10-18 15:15:45 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-10-18 20:22:03 -1000
commit: 5173ed72bcfcddda21ff274ee31c6472fa150f29
parent: b15fa9224e6e1239414525d8d556d824701849fc
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/mm/memblock.c b/mm/memblock.c
index 5c3503c98b2f..b91df5cf54d3 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1692,7 +1692,7 @@ void __init memblock_cap_memory_range(phys_addr_t base, phys_addr_t size)
if (!size)
return;
- if (memblock.memory.cnt <= 1) {
+ if (!memblock_memory->total_size) {
pr_warn("%s: No memory registered yet\n", __func__);
return;
}