From 91fd799eb12bd43b3dfda368abb06d2a7d864462 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Thu, 16 Jun 2011 13:16:38 -0700 Subject: [PATCH] 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 --- drivers/staging/hv/vmbus_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }