target/s390x/cpu_models_sysemu: Drop local @err in apply_cpu_model()
authorZhao Liu <zhao1.liu@intel.com>
Thu, 25 Apr 2024 03:12:32 +0000 (11:12 +0800)
committerThomas Huth <thuth@redhat.com>
Tue, 30 Apr 2024 04:21:47 +0000 (06:21 +0200)
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>
target/s390x/cpu_models_sysemu.c

index bf855c659d5e9d9dc964f72319e6de8c7c77eccb..15be729c3d480c84306849d945f5aa07ecd20218 100644 (file)
@@ -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;
         }
     }