target/s390x: Fix broken user mode

Returning NULL from get_max_cpu_model results in a SIGSEGV runtime error.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170130131517.8092-1-sw@weilnetz.de>
Cc: qemu-stable@nongnu.org
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
(cherry picked from commit a352aa62a7)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
Stefan Weil 2017-01-30 14:15:17 +01:00 committed by Michael Roth
parent 2f8ab9b1dd
commit 877e2b016e
1 changed files with 0 additions and 2 deletions

View File

@ -659,7 +659,6 @@ static void check_compatibility(const S390CPUModel *max_model,
static S390CPUModel *get_max_cpu_model(Error **errp)
{
#ifndef CONFIG_USER_ONLY
static S390CPUModel max_model;
static bool cached;
@ -679,7 +678,6 @@ static S390CPUModel *get_max_cpu_model(Error **errp)
cached = true;
return &max_model;
}
#endif
return NULL;
}