Commit 49e86f16 authored by Amit Shah's avatar Amit Shah Committed by Rusty Russell
Browse files

virtio: console: don't rely on virtqueue_add_buf() returning capacity.

parent 9ed4cb07
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -396,6 +396,8 @@ static int add_inbuf(struct virtqueue *vq, struct port_buffer *buf)

	ret = virtqueue_add_buf(vq, sg, 0, 1, buf, GFP_ATOMIC);
	virtqueue_kick(vq);
	if (!ret)
		ret = vq->num_free;
	return ret;
}