diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/addr_map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/addr_map.c b/lib/addr_map.c index 9b3e0a544e..86e932e4b5 100644 --- a/lib/addr_map.c +++ b/lib/addr_map.c @@ -59,7 +59,7 @@ void *addrmap_phys_to_virt(phys_addr_t paddr) void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr, phys_size_t size, int idx) { - if (idx > CONFIG_SYS_NUM_ADDR_MAP) + if (idx >= CONFIG_SYS_NUM_ADDR_MAP) return; address_map[idx].vaddr = vaddr; |