freebsd11_network: Fix deinitialization following a failure to attach.
This fixes the KDL while loading iprowifi2100 w/o firmware installed. Full explanation: 1) device_attach calls start_wlan 2) start_wlan fails, because lack of firmware 3) ... -> device_detach called (from device_delete_child) 4) it calls stop_wlan that faults with BAD_VALUE 5) we leave device attached... then uninit_mbufs called -> KDL Change-Id: I18d06ea7be48e569838f17e3779d054000898043 Reviewed-on: https://review.haiku-os.org/635 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
02f3646adc
commit
5483aeeb57
@ -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;
|
||||
}
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user