Commit a352aa62 authored by Stefan Weil's avatar Stefan Weil Committed by Cornelia Huck
Browse files

target/s390x: Fix broken user mode



Returning NULL from get_max_cpu_model results in a SIGSEGV runtime error.

Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Message-Id: <20170130131517.8092-1-sw@weilnetz.de>
Cc: qemu-stable@nongnu.org
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
parent 55a19ad8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -660,7 +660,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;

@@ -680,7 +679,6 @@ static S390CPUModel *get_max_cpu_model(Error **errp)
        cached = true;
        return &max_model;
    }
#endif
    return NULL;
}