qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/6] vhost: fix migration_blocker initialization


From: Nikolay Nikolaev
Subject: [Qemu-devel] [PATCH 5/6] vhost: fix migration_blocker initialization
Date: Thu, 19 Jun 2014 18:08:43 +0300
User-agent: StGit/0.17.1-dirty

error_set expect errp to be a NULL initialized pointer.

Signed-off-by: Nikolay Nikolaev <address@hidden>
---
 hw/virtio/vhost.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]