diff mbox

[5/6] vhost: fix migration_blocker initialization

Message ID 20140619150830.10499.78682.stgit@3820
State New
Headers show

Commit Message

Nikolay Nikolaev June 19, 2014, 3:08 p.m. UTC
error_set expect errp to be a NULL initialized pointer.

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
---
 hw/virtio/vhost.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index c44c15c..e55fe1c 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -857,12 +857,11 @@  int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
         .eventfd_del = vhost_eventfd_del,
         .priority = 10
     };
+    hdev->migration_blocker = NULL;
     if (!(hdev->features & (0x1 << VHOST_F_LOG_ALL))) {
         error_setg(&hdev->migration_blocker,
                    "Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.");
         migrate_add_blocker(hdev->migration_blocker);
-    } else {
-        hdev->migration_blocker = NULL;
     }
     hdev->mem = g_malloc0(offsetof(struct vhost_memory, regions));
     hdev->n_mem_sections = 0;