diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memblock.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index 9695398a14c0..c33a2a2ae69f 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -96,13 +96,10 @@ bool __init_memblock memblock_overlaps_region(struct memblock_type *type, { unsigned long i; - for (i = 0; i < type->cnt; i++) { - phys_addr_t rgnbase = type->regions[i].base; - phys_addr_t rgnsize = type->regions[i].size; - if (memblock_addrs_overlap(base, size, rgnbase, rgnsize)) + for (i = 0; i < type->cnt; i++) + if (memblock_addrs_overlap(base, size, type->regions[i].base, + type->regions[i].size)) break; - } - return i < type->cnt; } |