Message ID | 20200128095021.8076-5-david@redhat.com |
---|---|
State | New |
Headers | show |
Series | mm/memory_hotplug: backport of pending stable fixes | expand |
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index ac1574a69610..5fca7225f3fe 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -691,7 +691,7 @@ static int add_memory_block(int base_section_nr) int i, ret, section_count = 0, section_nr; for (i = base_section_nr; - (i < base_section_nr + sections_per_block) && i < NR_MEM_SECTIONS; + i < base_section_nr + sections_per_block; i++) { if (!present_section_nr(i)) continue;