Drivers:hv: Fix a bug in vmbus_driver_unregister()

The function vmbus_exists() was introduced recently to deal with cases where
the vmbus driver failed to initialize and yet other Hyper-V drivers attempted
to register with the vmbus bus driver. This patch introduced a bug where
vmbus_driver_unregister() would fail to unregister the driver. This patch
fixes the problem.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Fuzhou Chen <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
K. Y. Srinivasan 2011-12-27 13:49:37 -08:00 • committed by Greg Kroah-Hartman
commit 8f257a142f

View file

@ -627,10 +627,7 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver)
pr_info("unregistering driver %s\n", hv_driver->name);
if (!vmbus_exists())
return;
driver_unregister(&hv_driver->driver);
driver_unregister(&hv_driver->driver);
}
EXPORT_SYMBOL_GPL(vmbus_driver_unregister);