summary refs log tree commit diff stats
path: root/target
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2024-04-25 11:12:32 +0800
committerThomas Huth <thuth@redhat.com>2024-04-30 06:21:47 +0200
commit046bf2a6184f0a87b89b735ef77edd9a13a96656 (patch)
tree494c1d1d2ccf52b1f50387e32fde2fade11d4f50 /target
parent38098df346b3daaa8771f2aee64c6b47d4c00e56 (diff)
downloadfocaccia-qemu-046bf2a6184f0a87b89b735ef77edd9a13a96656.tar.gz
focaccia-qemu-046bf2a6184f0a87b89b735ef77edd9a13a96656.zip
target/s390x/cpu_models_sysemu: Drop local @err in apply_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-8-zhao1.liu@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/s390x/cpu_models_sysemu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c
index bf855c659d..15be729c3d 100644
--- a/target/s390x/cpu_models_sysemu.c
+++ b/target/s390x/cpu_models_sysemu.c
@@ -389,7 +389,6 @@ CpuModelBaselineInfo *qmp_query_cpu_model_baseline(CpuModelInfo *infoa,
 
 void apply_cpu_model(const S390CPUModel *model, Error **errp)
 {
-    Error *err = NULL;
     static S390CPUModel applied_model;
     static bool applied;
 
@@ -405,8 +404,7 @@ void apply_cpu_model(const S390CPUModel *model, Error **errp)
     }
 
     if (kvm_enabled()) {
-        if (!kvm_s390_apply_cpu_model(model, &err)) {
-            error_propagate(errp, err);
+        if (!kvm_s390_apply_cpu_model(model, errp)) {
             return;
         }
     }