mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 02:23:16 +00:00
Revert "s390/mem_detect: do not update output parameters on failure"
This reverts commit cbc29f107e
.
Get rid of the following smatch warnings:
arch/s390/include/asm/mem_detect.h:86 get_mem_detect_end() error: uninitialized symbol 'end'.
arch/s390/include/asm/mem_detect.h:86 get_mem_detect_end() error: uninitialized symbol 'end'.
arch/s390/boot/vmem.c:256 setup_vmem() error: uninitialized symbol 'start'.
arch/s390/boot/vmem.c:258 setup_vmem() error: uninitialized symbol 'end'.
Note that there is no bug in the code. This is purely to silence smatch.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
be76ea6144
commit
2f09c2ea6c
@ -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,
|
static inline int __get_mem_detect_block(u32 n, unsigned long *start,
|
||||||
unsigned long *end)
|
unsigned long *end)
|
||||||
{
|
{
|
||||||
if (n >= mem_detect.count)
|
if (n >= mem_detect.count) {
|
||||||
|
*start = 0;
|
||||||
|
*end = 0;
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (n < MEM_INLINED_ENTRIES) {
|
if (n < MEM_INLINED_ENTRIES) {
|
||||||
*start = (unsigned long)mem_detect.entries[n].start;
|
*start = (unsigned long)mem_detect.entries[n].start;
|
||||||
|
Loading…
Reference in New Issue
Block a user