Skip to content

Commit

Permalink
target/s390x/cpu_models_sysemu: Drop local @err in apply_cpu_model()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
trueptolemy authored and huth committed Apr 30, 2024
1 parent 38098df commit 046bf2a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions target/s390x/cpu_models_sysemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
}
Expand Down

0 comments on commit 046bf2a

Please sign in to comment.