[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1201791-5078-ca9d-e5af-df6ebd05d67b@users.sourceforge.net>
Date: Wed, 14 Sep 2016 16:03:15 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: virtualization@...ts.linux-foundation.org,
Amit Shah <amit.shah@...hat.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Rusty Russell <rusty@...tcorp.com.au>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 04/11] virtio_console: Rename jump labels in virtcons_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 14 Sep 2016 14:24:05 +0200
Adjust jump labels according to the current Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/char/virtio_console.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 004314e..768bbb7 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2037,7 +2037,7 @@ static int virtcons_probe(struct virtio_device *vdev)
portdev = kmalloc(sizeof(*portdev), GFP_KERNEL);
if (!portdev) {
err = -ENOMEM;
- goto fail;
+ goto exit;
}
/* Attach this portdev to this virtio_device, and vice-versa. */
@@ -2051,7 +2051,7 @@ static int virtcons_probe(struct virtio_device *vdev)
"Error %d registering chrdev for device %u\n",
portdev->chr_major, vdev->index);
err = portdev->chr_major;
- goto free;
+ goto free_port;
}
multiport = false;
@@ -2068,7 +2068,7 @@ static int virtcons_probe(struct virtio_device *vdev)
err = init_vqs(portdev);
if (err < 0) {
dev_err(&vdev->dev, "Error %d initializing vqs\n", err);
- goto free_chrdev;
+ goto unregister;
}
spin_lock_init(&portdev->ports_lock);
@@ -2091,7 +2091,7 @@ static int virtcons_probe(struct virtio_device *vdev)
dev_err(&vdev->dev,
"Error allocating buffers for control queue\n");
err = -ENOMEM;
- goto free_vqs;
+ goto send_control_message;
}
} else {
/*
@@ -2121,17 +2121,16 @@ static int virtcons_probe(struct virtio_device *vdev)
wait_for_completion(&early_console_added);
return 0;
-
-free_vqs:
+ send_control_message:
/* The host might want to notify mgmt sw about device add failure */
__send_control_msg(portdev, VIRTIO_CONSOLE_BAD_ID,
VIRTIO_CONSOLE_DEVICE_READY, 0);
remove_vqs(portdev);
-free_chrdev:
+ unregister:
unregister_chrdev(portdev->chr_major, "virtio-portsdev");
-free:
+ free_port:
kfree(portdev);
-fail:
+ exit:
return err;
}
--
2.10.0
Powered by blists - more mailing lists