summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2011-09-14 13:06:44 +0530
committerRusty Russell <rusty@rustcorp.com.au>2011-11-02 11:41:00 +1030
commitce072a0cee420782ed0a079ac17c7ca26056fb95 (patch)
tree678f0850a3a1fbeee88fb9e1d395141f8b61ac09 /drivers/char
parentd25a9ddae93ca97aa03fdab1363baf0e0c35d960 (diff)
downloadlinux-ce072a0cee420782ed0a079ac17c7ca26056fb95.tar.gz
linux-ce072a0cee420782ed0a079ac17c7ca26056fb95.tar.bz2
linux-ce072a0cee420782ed0a079ac17c7ca26056fb95.zip
virtio: console: rename variable
'ret' is a misnomer in discard_port_data() since we don't return the value. Rename it to 'err'. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/virtio_console.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index cb5edf33bebf..0538425e9a71 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -387,8 +387,7 @@ static void discard_port_data(struct port *port)
{
struct port_buffer *buf;
struct virtqueue *vq;
- unsigned int len;
- int ret;
+ unsigned int len, err;
if (!port->portdev) {
/* Device has been unplugged. vqs are already gone. */
@@ -400,18 +399,18 @@ static void discard_port_data(struct port *port)
else
buf = virtqueue_get_buf(vq, &len);
- ret = 0;
+ err = 0;
while (buf) {
if (add_inbuf(vq, buf) < 0) {
- ret++;
+ err++;
free_buf(buf);
}
buf = virtqueue_get_buf(vq, &len);
}
port->inbuf = NULL;
- if (ret)
+ if (err)
dev_warn(port->dev, "Errors adding %d buffers back to vq\n",
- ret);
+ err);
}
static bool port_has_data(struct port *port)