diff options
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r-- | drivers/vhost/net.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 026be580d318..e1e22e0f01e8 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -505,9 +505,13 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, | |||
505 | r = -ENOBUFS; | 505 | r = -ENOBUFS; |
506 | goto err; | 506 | goto err; |
507 | } | 507 | } |
508 | d = vhost_get_vq_desc(vq->dev, vq, vq->iov + seg, | 508 | r = vhost_get_vq_desc(vq->dev, vq, vq->iov + seg, |
509 | ARRAY_SIZE(vq->iov) - seg, &out, | 509 | ARRAY_SIZE(vq->iov) - seg, &out, |
510 | &in, log, log_num); | 510 | &in, log, log_num); |
511 | if (unlikely(r < 0)) | ||
512 | goto err; | ||
513 | |||
514 | d = r; | ||
511 | if (d == vq->num) { | 515 | if (d == vq->num) { |
512 | r = 0; | 516 | r = 0; |
513 | goto err; | 517 | goto err; |