summary refs log tree commit diff stats
path: root/qom/object_interfaces.c
diff options
context:
space:
mode:
Diffstat (limited to 'qom/object_interfaces.c')
-rw-r--r--qom/object_interfaces.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 7e26f86fa6..3085ae0b31 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -63,8 +63,7 @@ Object *user_creatable_add_type(const char *type, const char *id,
 
     assert(qdict);
     obj = object_new(type);
-    visit_start_struct(v, NULL, NULL, 0, &local_err);
-    if (local_err) {
+    if (!visit_start_struct(v, NULL, NULL, 0, &local_err)) {
         goto out;
     }
     for (e = qdict_first(qdict); e; e = qdict_next(qdict, e)) {