aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_caps.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc/spapr_caps.c')
-rw-r--r--hw/ppc/spapr_caps.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index 0c2bc8e06e..52be86e49c 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -88,8 +88,7 @@ static void spapr_cap_set_bool(Object *obj, Visitor *v, const char *name,
bool value;
Error *local_err = NULL;
- 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;
}
@@ -127,8 +126,7 @@ static void spapr_cap_set_string(Object *obj, Visitor *v, const char *name,
uint8_t i;
char *val;
- visit_type_str(v, name, &val, &local_err);
- if (local_err) {
+ if (!visit_type_str(v, name, &val, &local_err)) {
error_propagate(errp, local_err);
return;
}
@@ -171,8 +169,7 @@ static void spapr_cap_set_pagesize(Object *obj, Visitor *v, const char *name,
uint8_t val;
Error *local_err = NULL;
- visit_type_size(v, name, &pagesize, &local_err);
- if (local_err) {
+ if (!visit_type_size(v, name, &pagesize, &local_err)) {
error_propagate(errp, local_err);
return;
}