diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index cf82e726639762874fad93fb5e1b534d7543a846..5eaeca805c95c90528289e680eb7f9ec3d6f45e5 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1784,7 +1784,7 @@ static int log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) ret = translate_desc(vq, (uintptr_t)vq->used + used_offset, len, iov, 64, VHOST_ACCESS_WO); - if (ret) + if (ret < 0) return ret; for (i = 0; i < ret; i++) {