aboutsummaryrefslogtreecommitdiff
path: root/block/vhdx.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/vhdx.c')
-rw-r--r--block/vhdx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block/vhdx.c b/block/vhdx.c
index a36d9d924a..791eb90263 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -1089,9 +1089,8 @@ static int vhdx_open(BlockDriverState *bs, QDict *options, int flags,
error_setg(&s->migration_blocker, "The vhdx format used by node '%s' "
"does not support live migration",
bdrv_get_device_or_node_name(bs));
- ret = migrate_add_blocker(s->migration_blocker, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ ret = migrate_add_blocker(s->migration_blocker, errp);
+ if (ret < 0) {
error_free(s->migration_blocker);
goto fail;
}