|
@@ -824,7 +824,7 @@ void __init_memblock __next_reserved_mem_region(u64 *idx,
|
|
{
|
|
{
|
|
struct memblock_type *type = &memblock.reserved;
|
|
struct memblock_type *type = &memblock.reserved;
|
|
|
|
|
|
- if (*idx >= 0 && *idx < type->cnt) {
|
|
|
|
|
|
+ if (*idx < type->cnt) {
|
|
struct memblock_region *r = &type->regions[*idx];
|
|
struct memblock_region *r = &type->regions[*idx];
|
|
phys_addr_t base = r->base;
|
|
phys_addr_t base = r->base;
|
|
phys_addr_t size = r->size;
|
|
phys_addr_t size = r->size;
|