提交 da5aeb8a 编写于 作者: M Michael S. Tsirkin 提交者: Anthony Liguori

vhost: error code

fix up errors returned to include errno, not just -1
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
(cherry picked from commit c8852121)
上级 7c763827
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册