Skip to contentSkip to conversation

vhost: put log correctly in vhost_dev_start()

PATCH New Jason Wang 1 participant 1 message Jun 5, 2015

lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH 1/1 vhost: put log correctly in vhost_dev_start()

We allocate an dummy log even if the size is zero. So we should put it unconditionally too.

---
 hw/virtio/vhost.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
hw/virtio/vhost.c +1 -3
index 01f1e04..3a52a4d 100644
@@ -1111,9 +1111,7 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev)
 
     return 0;
 fail_log:
-    if (hdev->log_size) {
-        vhost_log_put(hdev, false);
-    }
+    vhost_log_put(hdev, false);
 fail_vq:
     while (--i >= 0) {
         vhost_virtqueue_stop(hdev,
Signature · 1 line
1.8.3.1