From: Larry Finger Date: Sun, 12 Jan 2014 21:11:39 +0000 (-0600) Subject: b43legacy: Fix unload oops if firmware is not available X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=452028665312672c6ba9e16a19248ee00ead9400;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Larry Finger Cc: Stable Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 572668821862..349c77605231 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c @@ -3919,6 +3919,7 @@ static void b43legacy_remove(struct ssb_device *dev) * as the ieee80211 unreg will destroy the workqueue. */ cancel_work_sync(&wldev->restart_work); cancel_work_sync(&wl->firmware_load); + complete(&wldev->fw_load_complete); B43legacy_WARN_ON(!wl); if (!wldev->fw.ucode)