projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ed4cb0
)
virtio: console: don't rely on virtqueue_add_buf() returning capacity.
author
Amit Shah
<amit.shah@redhat.com>
Sun, 9 Dec 2012 23:15:12 +0000
(09:45 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 18 Dec 2012 04:50:34 +0000
(15:20 +1030)
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/virtio_console.c
b/drivers/char/virtio_console.c
index 8ab9c3d4bf134c23bda43adafc688485a1c9e764..89bdc31a3dc635fa56fe23b5489b969663631e75 100644
(file)
--- a/
drivers/char/virtio_console.c
+++ b/
drivers/char/virtio_console.c
@@
-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;
}