Commit 78af1aef authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: visorbus: fix up gotos in visorbus_init

This patch fixes the gotos in visorbus_init
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarTimothy Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b750b059
...@@ -1275,24 +1275,24 @@ struct channel_size_info { ...@@ -1275,24 +1275,24 @@ struct channel_size_info {
int int
visorbus_init(void) visorbus_init(void)
{ {
int rc = 0; int err;
POSTCODE_LINUX_3(DRIVER_ENTRY_PC, rc, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_3(DRIVER_ENTRY_PC, 0, POSTCODE_SEVERITY_INFO);
bus_device_info_init(&clientbus_driverinfo, bus_device_info_init(&clientbus_driverinfo,
"clientbus", "visorbus", "clientbus", "visorbus",
VERSION, NULL); VERSION, NULL);
rc = create_bus_type(); err = create_bus_type();
if (rc < 0) { if (err < 0) {
POSTCODE_LINUX_2(BUS_CREATE_ENTRY_PC, DIAG_SEVERITY_ERR); POSTCODE_LINUX_2(BUS_CREATE_ENTRY_PC, DIAG_SEVERITY_ERR);
goto away; goto error;
} }
periodic_dev_workqueue = create_singlethread_workqueue("visorbus_dev"); periodic_dev_workqueue = create_singlethread_workqueue("visorbus_dev");
if (!periodic_dev_workqueue) { if (!periodic_dev_workqueue) {
POSTCODE_LINUX_2(CREATE_WORKQUEUE_PC, DIAG_SEVERITY_ERR); POSTCODE_LINUX_2(CREATE_WORKQUEUE_PC, DIAG_SEVERITY_ERR);
rc = -ENOMEM; err = -ENOMEM;
goto away; goto error;
} }
/* This enables us to receive notifications when devices appear for /* This enables us to receive notifications when devices appear for
...@@ -1302,13 +1302,11 @@ visorbus_init(void) ...@@ -1302,13 +1302,11 @@ visorbus_init(void)
&chipset_responders, &chipset_responders,
&chipset_driverinfo); &chipset_driverinfo);
rc = 0; return 0;
away: error:
if (rc) POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, err, POSTCODE_SEVERITY_ERR);
POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, rc, return err;
POSTCODE_SEVERITY_ERR);
return rc;
} }
void void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment