]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
s390/setup: call memblock_reserve only for size > 0
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 27 Dec 2016 13:47:42 +0000 (14:47 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Jan 2017 06:27:53 +0000 (07:27 +0100)
reserve_initrd currently calls memblock_reserve even if the to be
reserved size is zero. Even though the memblock core code can handle
this correctly, it still yields confusing debug messages if
memblock debugging is enabled.
Therefore make sure to not call memblock_reserve with a size of zero.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/setup.c

index 865a48871ca47d2e8a1c24adfb79ae042389b82a..1a3388c32a839c446f866c84bf34f7972376a94d 100644 (file)
@@ -636,6 +636,8 @@ static void __init reserve_crashkernel(void)
 static void __init reserve_initrd(void)
 {
 #ifdef CONFIG_BLK_DEV_INITRD
+       if (!INITRD_START || !INITRD_SIZE)
+               return;
        initrd_start = INITRD_START;
        initrd_end = initrd_start + INITRD_SIZE;
        memblock_reserve(INITRD_START, INITRD_SIZE);