[PATCH 05/77] Staging: hv: vmbus: Properly handle the error in hv_acpi_init()

From: K. Y. Srinivasan
Date: Thu Jun 16 2011 - 16:02:07 EST


Properly handle the error in hv_acpi_init().

Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Signed-off-by: Hank Janssen <hjanssen@xxxxxxxxxxxxx>
---
drivers/staging/hv/vmbus_drv.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index be158be..1c949f5 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;
}


--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/