aboutsummaryrefslogtreecommitdiff
path: root/backends/hostmem-memfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/hostmem-memfd.c')
-rw-r--r--backends/hostmem-memfd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c
index 1b5e4bfe0d..d4281c0032 100644
--- a/backends/hostmem-memfd.c
+++ b/backends/hostmem-memfd.c
@@ -85,8 +85,7 @@ memfd_backend_set_hugetlbsize(Object *obj, Visitor *v, const char *name,
goto out;
}
- visit_type_size(v, name, &value, &local_err);
- if (local_err) {
+ if (!visit_type_size(v, name, &value, &local_err)) {
goto out;
}
if (!value) {