aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r--hw/i386/pc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index d7f27bc16b..cb15261420 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1862,8 +1862,7 @@ static void pc_machine_set_max_ram_below_4g(Object *obj, Visitor *v,
Error *error = NULL;
uint64_t value;
- visit_type_size(v, name, &value, &error);
- if (error) {
+ if (!visit_type_size(v, name, &value, &error)) {
error_propagate(errp, error);
return;
}