From: Marc-André Lureau <marcandre.lur...@redhat.com> Return read errors (not sure why those were ignored)
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- hw/virtio/vhost-user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index e51df27..819481d 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -221,7 +221,7 @@ static int vhost_user_set_log_base(struct vhost_dev *dev, uint64_t base, if (shmfd) { msg.size = 0; if (vhost_user_read(dev, &msg) < 0) { - return 0; + return -1; } if (msg.request != VHOST_USER_SET_LOG_BASE) { @@ -373,7 +373,7 @@ static int vhost_user_get_vring_base(struct vhost_dev *dev, } if (vhost_user_read(dev, &msg) < 0) { - return 0; + return -1; } if (msg.request != VHOST_USER_GET_VRING_BASE) { @@ -474,7 +474,7 @@ static int vhost_user_get_u64(struct vhost_dev *dev, int request, uint64_t *u64) } if (vhost_user_read(dev, &msg) < 0) { - return 0; + return -1; } if (msg.request != request) { -- 2.7.4