diff --git a/arch/s390/include/asm/mem_detect.h b/arch/s390/include/asm/mem_detect.h index 08798ddf5143..decd8c4cb799 100644 --- a/arch/s390/include/asm/mem_detect.h +++ b/arch/s390/include/asm/mem_detect.h @@ -40,8 +40,11 @@ void add_mem_detect_block(u64 start, u64 end); static inline int __get_mem_detect_block(u32 n, unsigned long *start, unsigned long *end) { - if (n >= mem_detect.count) + if (n >= mem_detect.count) { + *start = 0; + *end = 0; return -1; + } if (n < MEM_INLINED_ENTRIES) { *start = (unsigned long)mem_detect.entries[n].start;