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>
This commit is contained in:
Zhao Liu 2024-04-25 11:12:27 +08:00 committed by Thomas Huth
parent 7c0c099a88
commit 9c2df9c5e8

View File

@ -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;
}