summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/vmcp.c
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2019-08-19 10:44:54 +0200
committerVasily Gorbik <gor@linux.ibm.com>2019-08-26 12:51:17 +0200
commita45425d8a5a672d3322164cfce10b7b6fb32fcc2 (patch)
tree4ae2dd8b3efe44027a543c4921af6d6a9b54a127 /drivers/s390/char/vmcp.c
parent915ef7bda76466a5542a76694c08709895383f1c (diff)
downloadlinux-a45425d8a5a672d3322164cfce10b7b6fb32fcc2.tar.gz
linux-a45425d8a5a672d3322164cfce10b7b6fb32fcc2.tar.bz2
linux-a45425d8a5a672d3322164cfce10b7b6fb32fcc2.zip
s390/vmcp: correct early_param handling
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>
Diffstat (limited to 'drivers/s390/char/vmcp.c')
-rw-r--r--drivers/s390/char/vmcp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c
index 0fa1b6b1491a..9e066281e2d0 100644
--- a/drivers/s390/char/vmcp.c
+++ b/drivers/s390/char/vmcp.c
@@ -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;
}