From c885212109b0ad79888ced410c2ff0d0e883cb15 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 6 Oct 2010 15:20:28 +0200 Subject: vhost: error code fix up errors returned to include errno, not just -1 Signed-off-by: Michael S. Tsirkin --- hw/vhost.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/vhost.c') diff --git a/hw/vhost.c b/hw/vhost.c index fb95121044..8586f66bac 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -515,12 +515,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; } -- cgit v1.2.1