diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-10-06 15:20:28 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-10-12 16:10:00 -0500 |
commit | da5aeb8aeba90bcf33b9ccb89cfee20e04fd6eca (patch) | |
tree | 4dab85a40dc38e0f34096cf3a8b19eb581b43718 | |
parent | 7c763827a58ad8a399ff22b6f9f0e1a825e58bd1 (diff) |
vhost: error code
fix up errors returned to include errno, not just -1
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit c885212109b0ad79888ced410c2ff0d0e883cb15)
-rw-r--r-- | hw/vhost.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vhost.c b/hw/vhost.c index f6689a7b99..3dc56d2c9e 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -517,12 +517,14 @@ static int vhost_virtqueue_init(struct vhost_dev *dev, file.fd = event_notifier_get_fd(virtio_queue_get_host_notifier(vvq)); r = ioctl(dev->control, VHOST_SET_VRING_KICK, &file); if (r) { + r = -errno; goto fail_kick; } file.fd = event_notifier_get_fd(virtio_queue_get_guest_notifier(vvq)); r = ioctl(dev->control, VHOST_SET_VRING_CALL, &file); if (r) { + r = -errno; goto fail_call; } |