Browse files

Drivers:hv: Fix a bug in vmbus_driver_unregister()

commit 8f257a1 upstream.

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 <>
Signed-off-by: Fuzhou Chen <>
Cc: Sasha Levin <>
Signed-off-by: Greg Kroah-Hartman <>
  • Loading branch information...
kattisrinivasan authored and gregkh committed Dec 27, 2011
1 parent 32eef9e commit d1883e7052eeffca3f42922bb31fa44d0992c6a6
Showing with 1 addition and 4 deletions.
  1. +1 −4 drivers/hv/vmbus_drv.c
@@ -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);

0 comments on commit d1883e7

Please sign in to comment.