From: Michael S. Tsirkin Date: Wed, 6 Oct 2010 13:20:28 +0000 (+0200) Subject: vhost: error code X-Git-Tag: v0.13.0~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da5aeb8aeba90bcf33b9ccb89cfee20e04fd6eca;p=thirdparty%2Fqemu.git vhost: error code fix up errors returned to include errno, not just -1 Signed-off-by: Michael S. Tsirkin (cherry picked from commit c885212109b0ad79888ced410c2ff0d0e883cb15) --- diff --git a/hw/vhost.c b/hw/vhost.c index f6689a7b99d..3dc56d2c9e0 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; }