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 <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>
This commit is contained in:
K. Y. Srinivasan 2011-06-16 13:16:38 -07:00 committed by Greg Kroah-Hartman
parent 9079ce6912
commit 91fd799eb1
1 changed files with 4 additions and 1 deletions

View 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;
}