Message ID | 20160624135110.17260-7-marcandre.lureau@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index ce930cb..9c8c9f8 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1011,7 +1011,6 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, r = -1; goto fail; } - QLIST_INSERT_HEAD(&vhost_devices, hdev, entry); r = hdev->vhost_ops->vhost_set_owner(hdev); if (r < 0) { @@ -1070,6 +1069,7 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, hdev->started = false; hdev->memory_changed = false; memory_listener_register(&hdev->memory_listener, &address_space_memory); + QLIST_INSERT_HEAD(&vhost_devices, hdev, entry); return 0; fail_vq: while (--i >= 0) {