Commit 67980031 authored by Dr. David Alan Gilbert's avatar Dr. David Alan Gilbert Committed by Juan Quintela
Browse files

vmstate registration: check return values



Check qdev's call to vmstate_register_with_alias_id; that gets
most of the common uses; there's hundreds of calls via vmstate_register
which could get fixed over time.

Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
Message-Id: <20170202125956.21942-4-dgilbert@redhat.com>
Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
parent 581f08ba
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -933,10 +933,12 @@ static void device_set_realized(Object *obj, bool value, Error **errp)
        }

        if (qdev_get_vmsd(dev)) {
            vmstate_register_with_alias_id(dev, -1, qdev_get_vmsd(dev), dev,
            if (vmstate_register_with_alias_id(dev, -1, qdev_get_vmsd(dev), dev,
                                               dev->instance_id_alias,
                                               dev->alias_required_for_version,
                                           NULL);
                                               &local_err) < 0) {
                goto post_realize_fail;
            }
        }

        QLIST_FOREACH(bus, &dev->child_bus, sibling) {