aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/arm/cpu64.c9
-rw-r--r--target/arm/monitor.c3
-rw-r--r--target/i386/cpu.c15
-rw-r--r--target/ppc/compat.c3
-rw-r--r--target/s390x/cpu_models.c9
-rw-r--r--target/sparc/cpu.c3
6 files changed, 14 insertions, 28 deletions
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index a2f4733eed..343c227c09 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -467,8 +467,7 @@ static void cpu_max_set_sve_max_vq(Object *obj, Visitor *v, const char *name,
Error *err = NULL;
uint32_t max_vq;
- visit_type_uint32(v, name, &max_vq, &err);
- if (err) {
+ if (!visit_type_uint32(v, name, &max_vq, &err)) {
error_propagate(errp, err);
return;
}
@@ -513,8 +512,7 @@ static void cpu_arm_set_sve_vq(Object *obj, Visitor *v, const char *name,
Error *err = NULL;
bool value;
- visit_type_bool(v, name, &value, &err);
- if (err) {
+ if (!visit_type_bool(v, name, &value, &err)) {
error_propagate(errp, err);
return;
}
@@ -550,8 +548,7 @@ static void cpu_arm_set_sve(Object *obj, Visitor *v, const char *name,
bool value;
uint64_t t;
- visit_type_bool(v, name, &value, &err);
- if (err) {
+ if (!visit_type_bool(v, name, &value, &err)) {
error_propagate(errp, err);
return;
}
diff --git a/target/arm/monitor.c b/target/arm/monitor.c
index ea6598c412..98fe11ae69 100644
--- a/target/arm/monitor.c
+++ b/target/arm/monitor.c
@@ -174,8 +174,7 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
Error *err = NULL;
visitor = qobject_input_visitor_new(model->props);
- visit_start_struct(visitor, NULL, NULL, 0, &err);
- if (err) {
+ if (!visit_start_struct(visitor, NULL, NULL, 0, &err)) {
visit_free(visitor);
object_unref(obj);
error_propagate(errp, err);
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 36cbd3d027..c69d057df3 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4420,8 +4420,7 @@ static void x86_cpuid_version_set_family(Object *obj, Visitor *v,
Error *local_err = NULL;
int64_t value;
- visit_type_int(v, name, &value, &local_err);
- if (local_err) {
+ if (!visit_type_int(v, name, &value, &local_err)) {
error_propagate(errp, local_err);
return;
}
@@ -4463,8 +4462,7 @@ static void x86_cpuid_version_set_model(Object *obj, Visitor *v,
Error *local_err = NULL;
int64_t value;
- visit_type_int(v, name, &value, &local_err);
- if (local_err) {
+ if (!visit_type_int(v, name, &value, &local_err)) {
error_propagate(errp, local_err);
return;
}
@@ -4501,8 +4499,7 @@ static void x86_cpuid_version_set_stepping(Object *obj, Visitor *v,
Error *local_err = NULL;
int64_t value;
- visit_type_int(v, name, &value, &local_err);
- if (local_err) {
+ if (!visit_type_int(v, name, &value, &local_err)) {
error_propagate(errp, local_err);
return;
}
@@ -4606,8 +4603,7 @@ static void x86_cpuid_set_tsc_freq(Object *obj, Visitor *v, const char *name,
Error *local_err = NULL;
int64_t value;
- visit_type_int(v, name, &value, &local_err);
- if (local_err) {
+ if (!visit_type_int(v, name, &value, &local_err)) {
error_propagate(errp, local_err);
return;
}
@@ -6816,8 +6812,7 @@ static void x86_cpu_set_bit_prop(Object *obj, Visitor *v, const char *name,
return;
}
- visit_type_bool(v, name, &value, &local_err);
- if (local_err) {
+ if (!visit_type_bool(v, name, &value, &local_err)) {
error_propagate(errp, local_err);
return;
}
diff --git a/target/ppc/compat.c b/target/ppc/compat.c
index fda0dfe8f8..42f87a4bfe 100644
--- a/target/ppc/compat.c
+++ b/target/ppc/compat.c
@@ -264,8 +264,7 @@ static void ppc_compat_prop_set(Object *obj, Visitor *v, const char *name,
char *value;
uint32_t compat_pvr;
- visit_type_str(v, name, &value, &local_err);
- if (local_err) {
+ if (!visit_type_str(v, name, &value, &local_err)) {
error_propagate(errp, local_err);
return;
}
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 2fa609bffe..65c26c4c86 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -510,8 +510,7 @@ static void cpu_model_from_info(S390CPUModel *model, const CpuModelInfo *info,
if (qdict) {
visitor = qobject_input_visitor_new(info->props);
- visit_start_struct(visitor, NULL, NULL, 0, &err);
- if (err) {
+ if (!visit_start_struct(visitor, NULL, NULL, 0, &err)) {
error_propagate(errp, err);
visit_free(visitor);
object_unref(obj);
@@ -1017,8 +1016,7 @@ static void set_feature(Object *obj, Visitor *v, const char *name,
return;
}
- visit_type_bool(v, name, &value, &err);
- if (err) {
+ if (!visit_type_bool(v, name, &value, &err)) {
error_propagate(errp, err);
return;
}
@@ -1076,8 +1074,7 @@ static void set_feature_group(Object *obj, Visitor *v, const char *name,
return;
}
- visit_type_bool(v, name, &value, &err);
- if (err) {
+ if (!visit_type_bool(v, name, &value, &err)) {
error_propagate(errp, err);
return;
}
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index 3f05aba9d6..4a9257005d 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -804,8 +804,7 @@ static void sparc_set_nwindows(Object *obj, Visitor *v, const char *name,
Error *err = NULL;
int64_t value;
- visit_type_int(v, name, &value, &err);
- if (err) {
+ if (!visit_type_int(v, name, &value, &err)) {
error_propagate(errp, err);
return;
}