Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f89ff644 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville
Browse files

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 2d838bb6 fixed the same problem
for b43legacy.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Tested-by: default avatarMarkus 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: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6fcf2b10
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5404,6 +5404,8 @@ static void b43_bcma_remove(struct bcma_device *core)
	cancel_work_sync(&wldev->restart_work);

	B43_WARN_ON(!wl);
	if (!wldev->fw.ucode.data)
		return;			/* NULL if firmware never loaded */
	if (wl->current_dev == wldev && wl->hw_registred) {
		b43_leds_stop(wldev);
		ieee80211_unregister_hw(wl->hw);
@@ -5478,6 +5480,8 @@ static void b43_ssb_remove(struct ssb_device *sdev)
	cancel_work_sync(&wldev->restart_work);

	B43_WARN_ON(!wl);
	if (!wldev->fw.ucode.data)
		return;			/* NULL if firmware never loaded */
	if (wl->current_dev == wldev && wl->hw_registred) {
		b43_leds_stop(wldev);
		ieee80211_unregister_hw(wl->hw);