aboutsummaryrefslogtreecommitdiff
path: root/target/s390x
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2024-04-25 11:12:30 +0800
committerThomas Huth <thuth@redhat.com>2024-04-30 06:21:47 +0200
commitc6f1baf2d5a91fd2dcb31c3911fa5bec878faf6f (patch)
tree288e62e1cfbf68c027f84aed8352f0c77532c673 /target/s390x
parent47ab3b21374627419cd400141cacd534b9281f7b (diff)
downloadqemu-c6f1baf2d5a91fd2dcb31c3911fa5bec878faf6f.zip
qemu-c6f1baf2d5a91fd2dcb31c3911fa5bec878faf6f.tar.gz
qemu-c6f1baf2d5a91fd2dcb31c3911fa5bec878faf6f.tar.bz2
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>
Diffstat (limited to 'target/s390x')
-rw-r--r--target/s390x/cpu_models.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index a0e4acb..aae452c 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -551,7 +551,6 @@ static bool check_compatibility(const S390CPUModel *max_model,
S390CPUModel *get_max_cpu_model(Error **errp)
{
- Error *err = NULL;
static S390CPUModel max_model;
static bool cached;
@@ -560,8 +559,7 @@ S390CPUModel *get_max_cpu_model(Error **errp)
}
if (kvm_enabled()) {
- if (!kvm_s390_get_host_cpu_model(&max_model, &err)) {
- error_propagate(errp, err);
+ if (!kvm_s390_get_host_cpu_model(&max_model, errp)) {
return NULL;
}
} else {