Commit d6c1c5de authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: vmbus: Cleanup error handling in vmbus_bus_init()

Cleanup error handling in vmbus_bus_init().
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6de925b1
......@@ -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;
}
/**
......
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