diff options
-rw-r--r-- | drivers/virtio/virtio_mmio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 5d7fee385b70..09edeecd42a5 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c | |||
@@ -334,8 +334,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, | |||
334 | while (1) { | 334 | while (1) { |
335 | size = PAGE_ALIGN(vring_size(info->num, | 335 | size = PAGE_ALIGN(vring_size(info->num, |
336 | VIRTIO_MMIO_VRING_ALIGN)); | 336 | VIRTIO_MMIO_VRING_ALIGN)); |
337 | /* Already smallest possible allocation? */ | 337 | /* Did the last iter shrink the queue below minimum size? */ |
338 | if (size <= VIRTIO_MMIO_VRING_ALIGN * 2) { | 338 | if (size < VIRTIO_MMIO_VRING_ALIGN * 2) { |
339 | err = -ENOMEM; | 339 | err = -ENOMEM; |
340 | goto error_alloc_pages; | 340 | goto error_alloc_pages; |
341 | } | 341 | } |