forked from luck/tmp_suning_uos_patched
virtio: console: don't rely on virtqueue_add_buf() returning capacity.
Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
9ed4cb0734
commit
49e86f1686
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user