summaryrefslogtreecommitdiffstats
path: root/hw/virtio/vhost.c
diff options
context:
space:
mode:
authorJason Wang2015-06-05 05:05:58 +0200
committerMichael S. Tsirkin2015-06-10 16:00:08 +0200
commit24bfa207efb9b9d591552eefc1f414ff33ef0eac (patch)
tree9e274addafad0e1d6734ad059c6fe09c560c34c9 /hw/virtio/vhost.c
parentvhost: logs sharing (diff)
downloadqemu-24bfa207efb9b9d591552eefc1f414ff33ef0eac.tar.gz
qemu-24bfa207efb9b9d591552eefc1f414ff33ef0eac.tar.xz
qemu-24bfa207efb9b9d591552eefc1f414ff33ef0eac.zip
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. Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/vhost.c')
-rw-r--r--hw/virtio/vhost.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 01f1e0490f..3a52a4d037 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -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,