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

Commit 76bd141e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "of: reserved_mem: Fix kmemleak crash on no-map region"

parents 49f8d9d6 dc2ffa9c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/of_reserved_mem.h>
#include <linux/sort.h>
#include <linux/slab.h>
#include <linux/kmemleak.h>

#define MAX_RESERVED_REGIONS	32
static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
@@ -54,8 +55,10 @@ int __init __weak early_init_dt_alloc_reserved_memory_arch(phys_addr_t size,
	}

	*res_base = base;
	if (nomap)
	if (nomap) {
		kmemleak_ignore_phys(base);
		return memblock_remove(base, size);
	}
	return 0;
}
#else