aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/vfio/common.c')
-rw-r--r--hw/vfio/common.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 5ff5acf1d8..d806057b40 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -129,11 +129,7 @@ int vfio_block_multiple_devices_migration(VFIODevice *vbasedev, Error **errp)
error_setg(&multiple_devices_migration_blocker,
"Multiple VFIO devices migration is supported only if all of "
"them support P2P migration");
- ret = migrate_add_blocker(multiple_devices_migration_blocker, errp);
- if (ret < 0) {
- error_free(multiple_devices_migration_blocker);
- multiple_devices_migration_blocker = NULL;
- }
+ ret = migrate_add_blocker(&multiple_devices_migration_blocker, errp);
return ret;
}
@@ -145,9 +141,7 @@ void vfio_unblock_multiple_devices_migration(void)
return;
}
- migrate_del_blocker(multiple_devices_migration_blocker);
- error_free(multiple_devices_migration_blocker);
- multiple_devices_migration_blocker = NULL;
+ migrate_del_blocker(&multiple_devices_migration_blocker);
}
bool vfio_viommu_preset(VFIODevice *vbasedev)