diff --git a/src/libs/compat/freebsd11_network/compat.c b/src/libs/compat/freebsd11_network/compat.c index 19f9d0b749..3383226d98 100644 --- a/src/libs/compat/freebsd11_network/compat.c +++ b/src/libs/compat/freebsd11_network/compat.c @@ -471,7 +471,7 @@ device_detach(device_t device) int result = 0; if (HAIKU_DRIVER_REQUIRES(FBSD_WLAN_FEATURE)) result = stop_wlan(device); - if (result != 0) { + if (result != 0 && result != B_BAD_VALUE) { atomic_or(&device->flags, DEVICE_ATTACHED); return result; } diff --git a/src/libs/compat/freebsd11_network/driver.c b/src/libs/compat/freebsd11_network/driver.c index f15db3e1bd..e99cc5acdc 100644 --- a/src/libs/compat/freebsd11_network/driver.c +++ b/src/libs/compat/freebsd11_network/driver.c @@ -254,9 +254,9 @@ err6: if (HAIKU_DRIVER_REQUIRES(FBSD_TASKQUEUES)) uninit_taskqueues(); err5: - uninit_mbufs(); -err4: uninit_callout(); +err4: + uninit_mbufs(); err3: uninit_mutexes(); err2: