From: K. Y. Srinivasan Date: Thu, 16 Jun 2011 20:16:38 +0000 (-0700) Subject: Staging: hv: vmbus: Properly handle the error in hv_acpi_init() X-Git-Tag: MMI-PSA29.97-13-9~18845^2~373 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=91fd799eb12bd43b3dfda368abb06d2a7d864462;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: hv: vmbus: Properly handle the error in hv_acpi_init() Properly handle the error in hv_acpi_init(). Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index be158be28ee3..1c949f5fb716 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -788,7 +788,10 @@ static int __init hv_acpi_init(void) return -ENODEV; } - return vmbus_bus_init(irq); + ret = vmbus_bus_init(irq); + if (ret) + acpi_bus_unregister_driver(&vmbus_acpi_driver); + return ret; }