mirror of https://github.com/xemu-project/xemu.git
target/s390x/cpu_models: Drop local @err in get_max_cpu_model()
Use @errp to fetch error information directly and drop the local variable @err. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240425031232.1586401-6-zhao1.liu@intel.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
47ab3b2137
commit
c6f1baf2d5
|
@ -551,7 +551,6 @@ static bool check_compatibility(const S390CPUModel *max_model,
|
||||||
|
|
||||||
S390CPUModel *get_max_cpu_model(Error **errp)
|
S390CPUModel *get_max_cpu_model(Error **errp)
|
||||||
{
|
{
|
||||||
Error *err = NULL;
|
|
||||||
static S390CPUModel max_model;
|
static S390CPUModel max_model;
|
||||||
static bool cached;
|
static bool cached;
|
||||||
|
|
||||||
|
@ -560,8 +559,7 @@ S390CPUModel *get_max_cpu_model(Error **errp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kvm_enabled()) {
|
if (kvm_enabled()) {
|
||||||
if (!kvm_s390_get_host_cpu_model(&max_model, &err)) {
|
if (!kvm_s390_get_host_cpu_model(&max_model, errp)) {
|
||||||
error_propagate(errp, err);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue