aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
Diffstat (limited to 'accel')
-rw-r--r--accel/kvm/kvm-all.c3
-rw-r--r--accel/tcg/tcg-all.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index ab36fbfa0c..375e29fb69 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -3116,8 +3116,7 @@ static void kvm_set_kvm_shadow_mem(Object *obj, Visitor *v,
Error *error = NULL;
int64_t value;
- visit_type_int(v, name, &value, &error);
- if (error) {
+ if (!visit_type_int(v, name, &value, &error)) {
error_propagate(errp, error);
return;
}
diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index 3b4fda5640..d6b3d7fc07 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -185,8 +185,7 @@ static void tcg_set_tb_size(Object *obj, Visitor *v,
Error *error = NULL;
uint32_t value;
- visit_type_uint32(v, name, &value, &error);
- if (error) {
+ if (!visit_type_uint32(v, name, &value, &error)) {
error_propagate(errp, error);
return;
}