diff options
author | K. Y. Srinivasan | 2011-06-07 00:50:08 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-06-07 22:46:05 +0200 |
commit | d6c1c5de4e77d75e251bf30d68c99b7feae82ea2 (patch) | |
tree | 215b238be67d72c14147f2c3974c088f681c266b /drivers/staging | |
parent | Staging: hv: vmbus: Cleanup some error codes in vmbus_drv.c (diff) | |
download | kernel-qcow2-linux-d6c1c5de4e77d75e251bf30d68c99b7feae82ea2.tar.gz kernel-qcow2-linux-d6c1c5de4e77d75e251bf30d68c99b7feae82ea2.tar.xz kernel-qcow2-linux-d6c1c5de4e77d75e251bf30d68c99b7feae82ea2.zip |
Staging: hv: vmbus: Cleanup error handling in vmbus_bus_init()
Cleanup error handling in vmbus_bus_init().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/hv/vmbus_drv.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index a3c99f127482..be158be28ee3 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -535,7 +535,7 @@ static int vmbus_bus_init(int irq) ret = hv_init(); if (ret != 0) { pr_err("Unable to initialize the hypervisor - 0x%x\n", ret); - goto cleanup; + return ret; } /* Initialize the bus context */ @@ -544,10 +544,8 @@ static int vmbus_bus_init(int irq) /* Now, register the bus with LDM */ ret = bus_register(&hv_bus); - if (ret) { - ret = -1; - goto cleanup; - } + if (ret) + return ret; /* Get the interrupt resource */ ret = request_irq(irq, vmbus_isr, IRQF_SAMPLE_RANDOM, @@ -559,8 +557,7 @@ static int vmbus_bus_init(int irq) bus_unregister(&hv_bus); - ret = -1; - goto cleanup; + return ret; } vector = IRQ0_VECTOR + irq; @@ -574,14 +571,13 @@ static int vmbus_bus_init(int irq) if (ret) { free_irq(irq, hv_acpi_dev); bus_unregister(&hv_bus); - goto cleanup; + return ret; } vmbus_request_offers(); -cleanup: - return ret; + return 0; } /** |