aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/arm/monitor.c3
-rw-r--r--target/i386/cpu.c11
-rw-r--r--target/s390x/cpu_models.c3
3 files changed, 6 insertions, 11 deletions
diff --git a/target/arm/monitor.c b/target/arm/monitor.c
index 087726a..c162c5f 100644
--- a/target/arm/monitor.c
+++ b/target/arm/monitor.c
@@ -184,8 +184,7 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
i = 0;
while ((name = cpu_model_advertised_features[i++]) != NULL) {
if (qdict_get(qdict_in, name)) {
- object_property_set(obj, name, visitor, &err);
- if (err) {
+ if (!object_property_set(obj, name, visitor, &err)) {
break;
}
}
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index dd83cb7..2b60b61 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5271,9 +5271,8 @@ static void object_apply_props(Object *obj, QDict *props, Error **errp)
Error *err = NULL;
for (prop = qdict_first(props); prop; prop = qdict_next(props, prop)) {
- object_property_set_qobject(obj, qdict_entry_key(prop),
- qdict_entry_value(prop), &err);
- if (err) {
+ if (!object_property_set_qobject(obj, qdict_entry_key(prop),
+ qdict_entry_value(prop), &err)) {
break;
}
}
@@ -6340,16 +6339,14 @@ static void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
for (l = plus_features; l; l = l->next) {
const char *prop = l->data;
- object_property_set_bool(OBJECT(cpu), prop, true, &local_err);
- if (local_err) {
+ if (!object_property_set_bool(OBJECT(cpu), prop, true, &local_err)) {
goto out;
}
}
for (l = minus_features; l; l = l->next) {
const char *prop = l->data;
- object_property_set_bool(OBJECT(cpu), prop, false, &local_err);
- if (local_err) {
+ if (!object_property_set_bool(OBJECT(cpu), prop, false, &local_err)) {
goto out;
}
}
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 8ab2061..f3ba30e 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -517,8 +517,7 @@ static void cpu_model_from_info(S390CPUModel *model, const CpuModelInfo *info,
return;
}
for (e = qdict_first(qdict); e; e = qdict_next(qdict, e)) {
- object_property_set(obj, e->key, visitor, &err);
- if (err) {
+ if (!object_property_set(obj, e->key, visitor, &err)) {
break;
}
}