s390/vmcp: correct early_param handling
authorVasily Gorbik <gor@linux.ibm.com>
Mon, 19 Aug 2019 08:44:54 +0000 (10:44 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 26 Aug 2019 10:51:17 +0000 (12:51 +0200)
Check "p" is not NULL before passing it to memparse, which doesn't
handle that case explicitly.

Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/char/vmcp.c

index 0fa1b6b..9e06628 100644 (file)
@@ -43,6 +43,8 @@ static struct cma *vmcp_cma;
 
 static int __init early_parse_vmcp_cma(char *p)
 {
+       if (!p)
+               return 1;
        vmcp_cma_size = ALIGN(memparse(p, NULL), PAGE_SIZE);
        return 0;
 }