Skip to content

Commit 8f257a1

Browse files
kattisrinivasangregkh
authored andcommitted
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>
1 parent b9d4e71 commit 8f257a1

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎drivers/hv/vmbus_drv.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,10 +627,7 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver)
627627
pr_info("unregistering driver %s\n", hv_driver->name);
628628

629629
if (!vmbus_exists())
630-
return;
631-
632-
driver_unregister(&hv_driver->driver);
633-
630+
driver_unregister(&hv_driver->driver);
634631
}
635632
EXPORT_SYMBOL_GPL(vmbus_driver_unregister);
636633

0 commit comments

Comments
 (0)