Commit 45202866 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville

b43legacy: Fix unload oops if firmware is not available

The asyncronous firmware load uses a completion struct to hold firmware
processing until the user-space routines are up and running. There is.
however, a problem in that the waiter is nevered canceled during teardown.
As a result, unloading the driver when firmware is not available causes an oops.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0673effd
...@@ -3919,6 +3919,7 @@ static void b43legacy_remove(struct ssb_device *dev) ...@@ -3919,6 +3919,7 @@ static void b43legacy_remove(struct ssb_device *dev)
* as the ieee80211 unreg will destroy the workqueue. */ * as the ieee80211 unreg will destroy the workqueue. */
cancel_work_sync(&wldev->restart_work); cancel_work_sync(&wldev->restart_work);
cancel_work_sync(&wl->firmware_load); cancel_work_sync(&wl->firmware_load);
complete(&wldev->fw_load_complete);
B43legacy_WARN_ON(!wl); B43legacy_WARN_ON(!wl);
if (!wldev->fw.ucode) if (!wldev->fw.ucode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment