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 c885212109)
This commit is contained in:
Michael S. Tsirkin authored and Anthony Liguori committed 2010-10-12 16:10:00 -05:00
1 parent 7c763827a5
commit da5aeb8aeb
1 file changed
+2
+2
View File
@@ -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;
}