[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/6] vmstate registration: check return values
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 4/6] vmstate registration: check return values |
Date: |
Mon, 6 Feb 2017 17:51:47 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
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: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
hw/core/qdev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index ea97b15..06ba02e 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -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,
- dev->instance_id_alias,
- dev->alias_required_for_version,
- NULL);
+ if (vmstate_register_with_alias_id(dev, -1, qdev_get_vmsd(dev),
dev,
+ dev->instance_id_alias,
+ dev->alias_required_for_version,
+ &local_err) < 0) {
+ goto post_realize_fail;
+ }
}
QLIST_FOREACH(bus, &dev->child_bus, sibling) {
--
2.7.4
- [Qemu-devel] [PULL 0/6] Migration pull, Juan Quintela, 2017/02/06
- [Qemu-devel] [PULL 1/6] migration: create Migration Incoming State at init time, Juan Quintela, 2017/02/06
- [Qemu-devel] [PULL 2/6] vmstate_register_with_alias_id: Take an Error **, Juan Quintela, 2017/02/06
- [Qemu-devel] [PULL 3/6] migration: Check for ID length, Juan Quintela, 2017/02/06
- [Qemu-devel] [PULL 4/6] vmstate registration: check return values,
Juan Quintela <=
- [Qemu-devel] [PULL 5/6] Postcopy: Reset state to avoid cleanup assert, Juan Quintela, 2017/02/06
- [Qemu-devel] [PULL 6/6] postcopy: Recover block devices on early failure, Juan Quintela, 2017/02/06
- Re: [Qemu-devel] [PULL 0/6] Migration pull, Peter Maydell, 2017/02/06