diff options
Diffstat (limited to 'block/vpc.c')
-rw-r--r-- | block/vpc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/block/vpc.c b/block/vpc.c index 8d5886f003..ed6353dbd4 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -422,13 +422,18 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags, #endif } - qemu_co_mutex_init(&s->lock); - /* Disable migration when VHD images are used */ error_setg(&s->migration_blocker, "The vpc format used by node '%s' " "does not support live migration", bdrv_get_device_or_node_name(bs)); - migrate_add_blocker(s->migration_blocker); + ret = migrate_add_blocker(s->migration_blocker, &local_err); + if (local_err) { + error_propagate(errp, local_err); + error_free(s->migration_blocker); + goto fail; + } + + qemu_co_mutex_init(&s->lock); return 0; |