diff options
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r-- | drivers/char/virtio_console.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index c74dacfa6795..a035ae39a359 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -65,7 +65,7 @@ static int put_chars(u32 vtermno, const char *buf, int count) | |||
65 | 65 | ||
66 | /* add_buf wants a token to identify this buffer: we hand it any | 66 | /* add_buf wants a token to identify this buffer: we hand it any |
67 | * non-NULL pointer, since there's only ever one buffer. */ | 67 | * non-NULL pointer, since there's only ever one buffer. */ |
68 | if (out_vq->vq_ops->add_buf(out_vq, sg, 1, 0, (void *)1) == 0) { | 68 | if (out_vq->vq_ops->add_buf(out_vq, sg, 1, 0, (void *)1) >= 0) { |
69 | /* Tell Host to go! */ | 69 | /* Tell Host to go! */ |
70 | out_vq->vq_ops->kick(out_vq); | 70 | out_vq->vq_ops->kick(out_vq); |
71 | /* Chill out until it's done with the buffer. */ | 71 | /* Chill out until it's done with the buffer. */ |
@@ -85,7 +85,7 @@ static void add_inbuf(void) | |||
85 | sg_init_one(sg, inbuf, PAGE_SIZE); | 85 | sg_init_one(sg, inbuf, PAGE_SIZE); |
86 | 86 | ||
87 | /* We should always be able to add one buffer to an empty queue. */ | 87 | /* We should always be able to add one buffer to an empty queue. */ |
88 | if (in_vq->vq_ops->add_buf(in_vq, sg, 0, 1, inbuf) != 0) | 88 | if (in_vq->vq_ops->add_buf(in_vq, sg, 0, 1, inbuf) < 0) |
89 | BUG(); | 89 | BUG(); |
90 | in_vq->vq_ops->kick(in_vq); | 90 | in_vq->vq_ops->kick(in_vq); |
91 | } | 91 | } |