Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e40d7123 authored by Jiacheng Zheng's avatar Jiacheng Zheng
Browse files

mm/memblock.c: fix bug in early_dyn_memhotplug



idx should be added after it is used, now it's added before
it is used. This is a bug, so fix it.

Change-Id: Ia875350b5cd30f9a8c1b57edac61163ef4e11cb1
Signed-off-by: default avatarJiacheng Zheng <jiaczhen@codeaurora.org>
parent 9529f971
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1838,8 +1838,8 @@ static int __init early_dyn_memhotplug(char *p)
	struct memblock_region *rgn;
	int blk = 0;

	while ((idx++) < memblock.memory.cnt) {
		rgn = &memblock.memory.regions[idx];
	while (idx < memblock.memory.cnt) {
		rgn = &memblock.memory.regions[idx++];
		addr = ALIGN(rgn->base, MIN_MEMORY_BLOCK_SIZE);
		rgn_end = rgn->base + rgn->size;
		while (addr + MIN_MEMORY_BLOCK_SIZE <= rgn_end) {