diff options
Diffstat (limited to 'hw/virtio/vhost.c')
-rw-r--r-- | hw/virtio/vhost.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index fd13135..c7f9d8b 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1309,13 +1309,13 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, r = hdev->vhost_ops->vhost_set_owner(hdev); if (r < 0) { - error_setg(errp, "vhost_set_owner failed"); + error_setg_errno(errp, -r, "vhost_set_owner failed"); goto fail; } r = hdev->vhost_ops->vhost_get_features(hdev, &features); if (r < 0) { - error_setg(errp, "vhost_get_features failed"); + error_setg_errno(errp, -r, "vhost_get_features failed"); goto fail; } @@ -1332,7 +1332,7 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, r = vhost_virtqueue_set_busyloop_timeout(hdev, hdev->vq_index + i, busyloop_timeout); if (r < 0) { - error_setg(errp, "Failed to set busyloop timeout"); + error_setg_errno(errp, -r, "Failed to set busyloop timeout"); goto fail_busyloop; } } @@ -1391,7 +1391,7 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, if (used_memslots > hdev->vhost_ops->vhost_backend_memslots_limit(hdev)) { error_setg(errp, "vhost backend memory slots limit is less" " than current number of present memory slots"); - r = -1; + r = -EINVAL; goto fail_busyloop; } |