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
+3 -1
View File
@@ -50,7 +50,9 @@ init_usb()
void
uninit_usb()
{
if (sUSB != NULL)
if (sUSB == NULL)
return;
put_module(B_USB_MODULE_NAME);
if (sUSBTaskqueue != NULL)
taskqueue_free(sUSBTaskqueue);