freebsd_network: Do not deinitialize USB if we never initialized it.

Fixes some "mutex not owned" KDLs seen on deinitialization.
This commit is contained in:
Augustin Cavalier
2022-07-06 16:03:46 -04:00
parent 19453ce798
commit 41d93c5ed1
+4 -2
View File
@@ -50,8 +50,10 @@ init_usb()
void
uninit_usb()
{
if (sUSB != NULL)
put_module(B_USB_MODULE_NAME);
if (sUSB == NULL)
return;
put_module(B_USB_MODULE_NAME);
if (sUSBTaskqueue != NULL)
taskqueue_free(sUSBTaskqueue);