Commit 8f257a142fc3868d69de3f996b95d7bdbc509560
Committed by
Greg Kroah-Hartman
1 parent
b9d4e714a8
Exists in
master
and in
6 other branches
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 <kys@microsoft.com> Signed-off-by: Fuzhou Chen <fuzhouch@microsoft.com> Cc: Sasha Levin <levinsasha928@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 1 changed file with 1 additions and 4 deletions Side-by-side Diff
drivers/hv/vmbus_drv.c
... | ... | @@ -627,10 +627,7 @@ |
627 | 627 | pr_info("unregistering driver %s\n", hv_driver->name); |
628 | 628 | |
629 | 629 | if (!vmbus_exists()) |
630 | - return; | |
631 | - | |
632 | - driver_unregister(&hv_driver->driver); | |
633 | - | |
630 | + driver_unregister(&hv_driver->driver); | |
634 | 631 | } |
635 | 632 | EXPORT_SYMBOL_GPL(vmbus_driver_unregister); |
636 | 633 |