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-6-zhao1.liu@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
S390CPUModel *get_max_cpu_model(Error **errp)
{
- Error *err = NULL;
static S390CPUModel max_model;
static bool cached;
}
if (kvm_enabled()) {
- if (!kvm_s390_get_host_cpu_model(&max_model, &err)) {
- error_propagate(errp, err);
+ if (!kvm_s390_get_host_cpu_model(&max_model, errp)) {
return NULL;
}
} else {