aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r--drivers/vhost/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 1318ee008346..17927b1f9334 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -246,7 +246,7 @@ static int get_rx_bufs(struct vhost_virtqueue *vq,
246 int r, nlogs = 0; 246 int r, nlogs = 0;
247 247
248 while (datalen > 0) { 248 while (datalen > 0) {
249 if (unlikely(headcount >= VHOST_NET_MAX_SG)) { 249 if (unlikely(seg >= VHOST_NET_MAX_SG)) {
250 r = -ENOBUFS; 250 r = -ENOBUFS;
251 goto err; 251 goto err;
252 } 252 }