diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-10-24 09:57:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-24 13:18:09 -0400 |
commit | f89ff6441df06abc2d95f3ef67525923032d6283 (patch) | |
tree | f6980ed0d4132092feb561cf0956b0759523395d /drivers/net | |
parent | 6fcf2b10533bf51c67f0286ddba16e958e7ed972 (diff) |
b43: Fix oops on unload when firmware not found
When b43 fails to find firmware when loaded, a subsequent unload will
oops due to calling ieee80211_unregister_hw() when the corresponding
register call was never made.
Commit 2d838bb608e2d1f6cb4280e76748cb812dc822e7 fixed the same problem
for b43legacy.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Markus Kanet <dvmailing@gmx.eu>
Cc: Stable <stable@vger.kernel.org> [V3.3.0+ (the patch will need to be refactored)]
Cc: Markus Kanet <dvmailing@gmx.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 73730e94e0ac..c5a99c8c8168 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -5404,6 +5404,8 @@ static void b43_bcma_remove(struct bcma_device *core) | |||
5404 | cancel_work_sync(&wldev->restart_work); | 5404 | cancel_work_sync(&wldev->restart_work); |
5405 | 5405 | ||
5406 | B43_WARN_ON(!wl); | 5406 | B43_WARN_ON(!wl); |
5407 | if (!wldev->fw.ucode.data) | ||
5408 | return; /* NULL if firmware never loaded */ | ||
5407 | if (wl->current_dev == wldev && wl->hw_registred) { | 5409 | if (wl->current_dev == wldev && wl->hw_registred) { |
5408 | b43_leds_stop(wldev); | 5410 | b43_leds_stop(wldev); |
5409 | ieee80211_unregister_hw(wl->hw); | 5411 | ieee80211_unregister_hw(wl->hw); |
@@ -5478,6 +5480,8 @@ static void b43_ssb_remove(struct ssb_device *sdev) | |||
5478 | cancel_work_sync(&wldev->restart_work); | 5480 | cancel_work_sync(&wldev->restart_work); |
5479 | 5481 | ||
5480 | B43_WARN_ON(!wl); | 5482 | B43_WARN_ON(!wl); |
5483 | if (!wldev->fw.ucode.data) | ||
5484 | return; /* NULL if firmware never loaded */ | ||
5481 | if (wl->current_dev == wldev && wl->hw_registred) { | 5485 | if (wl->current_dev == wldev && wl->hw_registred) { |
5482 | b43_leds_stop(wldev); | 5486 | b43_leds_stop(wldev); |
5483 | ieee80211_unregister_hw(wl->hw); | 5487 | ieee80211_unregister_hw(wl->hw); |