Staging: hv: vmbus: Properly handle the error in hv_acpi_init()
authorK. Y. Srinivasan <kys@microsoft.com>
Thu, 16 Jun 2011 20:16:38 +0000 (13:16 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Jul 2011 15:59:24 +0000 (08:59 -0700)
Properly handle the error in hv_acpi_init().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/vmbus_drv.c

index be158be28ee3ee20bc1c97ae1cf50d263f6b5c46..1c949f5fb716417c04dccda368bda7050f8b6401 100644 (file)
@@ -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;
 }