aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-03-13 18:05:16 +0100
committerMarkus Armbruster <armbru@redhat.com>2020-03-17 16:05:49 +0100
commit364effc0eb90f440e0355d6326d46fed8e23fb6a (patch)
tree9e58d248f5b12d407f0ac0e574d4df0b320394ab
parent20ac582d0cdf78348650318eeabba5bcd486613f (diff)
downloadqemu-364effc0eb90f440e0355d6326d46fed8e23fb6a.zip
qemu-364effc0eb90f440e0355d6326d46fed8e23fb6a.tar.gz
qemu-364effc0eb90f440e0355d6326d46fed8e23fb6a.tar.bz2
hw/misc/ivshmem: Use one Error * variable instead of two
Commit fe44dc9180 "migration: disallow migrate_add_blocker during migration" accidentally added a second Error * variable. Use the first one instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200313170517.22480-3-armbru@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
-rw-r--r--hw/misc/ivshmem.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 1a0fad7..a8dc9b3 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -832,7 +832,6 @@ static void ivshmem_common_realize(PCIDevice *dev, Error **errp)
IVShmemState *s = IVSHMEM_COMMON(dev);
Error *err = NULL;
uint8_t *pci_conf;
- Error *local_err = NULL;
/* IRQFD requires MSI */
if (ivshmem_has_feature(s, IVSHMEM_IOEVENTFD) &&
@@ -899,9 +898,9 @@ static void ivshmem_common_realize(PCIDevice *dev, Error **errp)
if (!ivshmem_is_master(s)) {
error_setg(&s->migration_blocker,
"Migration is disabled when using feature 'peer mode' in device 'ivshmem'");
- migrate_add_blocker(s->migration_blocker, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ migrate_add_blocker(s->migration_blocker, &err);
+ if (err) {
+ error_propagate(errp, err);
error_free(s->migration_blocker);
return;
}