[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/6] target/s390x/cpu_models_sysemu: Drop local @err in apply_cpu
From: |
Zhao Liu |
Subject: |
[PATCH 6/6] target/s390x/cpu_models_sysemu: Drop local @err in apply_cpu_model() |
Date: |
Fri, 19 Apr 2024 14:57:12 +0800 |
From: Zhao Liu <zhao1.liu@intel.com>
Use @errp to fetech error information directly and drop the local
virable @err.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
target/s390x/cpu_models_sysemu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c
index bf855c659d5e..15be729c3d48 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;
}
}
--
2.34.1
- Re: [PATCH 2/6] target/s390x/cpu_model: Drop local @err in s390_realize_cpu_model(), (continued)
[PATCH 4/6] target/s390x/cpu_models: Drop local @err in get_max_cpu_model(), Zhao Liu, 2024/04/19
[PATCH 6/6] target/s390x/cpu_models_sysemu: Drop local @err in apply_cpu_model(),
Zhao Liu <=
[PATCH 5/6] target/s390x/cpu_models: Make kvm_s390_apply_cpu_model() return boolean, Zhao Liu, 2024/04/19
Re: [PATCH 0/6] s390x/cpu_models: Misc cleanup on returned error code and local @err variables, Philippe Mathieu-Daudé, 2024/04/19