diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2024-04-25 11:12:27 +0800 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2024-04-30 06:21:47 +0200 |
commit | 9c2df9c5e849ce2c24a6518a56e6e44371ff541e (patch) | |
tree | add92184afc9192421a8e02a0abadeb5170a1ec5 /target/s390x | |
parent | 7c0c099a88fd45b3598118dd7dce9ba64a1d41b7 (diff) | |
download | qemu-9c2df9c5e849ce2c24a6518a56e6e44371ff541e.zip qemu-9c2df9c5e849ce2c24a6518a56e6e44371ff541e.tar.gz qemu-9c2df9c5e849ce2c24a6518a56e6e44371ff541e.tar.bz2 |
target/s390x/cpu_model: Drop local @err in s390_realize_cpu_model()
Use @errp to fetch error information directly and drop the local
variable @err.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240425031232.1586401-3-zhao1.liu@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/s390x')
-rw-r--r-- | target/s390x/cpu_models.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 8cb47d9..052540a 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -577,7 +577,6 @@ S390CPUModel *get_max_cpu_model(Error **errp) void s390_realize_cpu_model(CPUState *cs, Error **errp) { ERRP_GUARD(); - Error *err = NULL; S390CPUClass *xcc = S390_CPU_GET_CLASS(cs); S390CPU *cpu = S390_CPU(cs); const S390CPUModel *max_model; @@ -606,8 +605,7 @@ void s390_realize_cpu_model(CPUState *cs, Error **errp) cpu->model->cpu_ver = max_model->cpu_ver; check_consistency(cpu->model); - if (!check_compatibility(max_model, cpu->model, &err)) { - error_propagate(errp, err); + if (!check_compatibility(max_model, cpu->model, errp)) { return; } |