Commit 86cde618 authored by Vasily Gorbik's avatar Vasily Gorbik

s390/startup: correct "dfltcc" option parsing

Currently if just "dfltcc" is passed as a kernel command line option
"val" going to be NULL, this leads to reading at address 0 in
strcmp(val, "off")

Fix that by making sure "val" is not NULL. This does not affect option
handling logic.
Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 3731ac57
......@@ -230,7 +230,7 @@ void parse_boot_command_line(void)
if (!strcmp(param, "vmalloc") && val)
vmalloc_size = round_up(memparse(val, NULL), PAGE_SIZE);
if (!strcmp(param, "dfltcc")) {
if (!strcmp(param, "dfltcc") && val) {
if (!strcmp(val, "off"))
zlib_dfltcc_support = ZLIB_DFLTCC_DISABLED;
else if (!strcmp(val, "on"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment