[PATCH 10/11] virtio_console: Rename jump labels in alloc_buf()

SF Markus Elfring
2016-09-14T14:09:29Z

Date: Wed, 14 Sep 2016 15:20:30 +0200

Adjust jump labels according to the current Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/char/virtio_console.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 69c6718..0c4d4e7 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -431,7 +431,7 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
buf = kmalloc(sizeof(*buf) + sizeof(struct scatterlist) * pages,
GFP_KERNEL);
if (!buf)
- goto fail;
+ goto exit;

buf->sgpages = pages;
if (pages > 0) {
@@ -451,7 +451,7 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
* in dma-coherent.c
*/
if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent)
- goto free_buf;
+ goto free_buffer;
buf->dev = vq->vdev->dev.parent->parent;

/* Increase device refcnt to avoid freeing it */
@@ -464,15 +464,14 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
}

if (!buf->buf)
- goto free_buf;
+ goto free_buffer;
buf->len = 0;
buf->offset = 0;
buf->size = buf_size;
return buf;
-
-free_buf:
+ free_buffer:
kfree(buf);
-fail:
+ exit:
return NULL;
}

--
2.10.0