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

Commit 15cd7638 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 0caf2160 cf512e1d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -20,6 +20,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];
@@ -50,8 +51,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