b43: Don't abuse wl->current_dev in the led work

Don't abuse wl->current_dev in the LED work for checking whether we're
going down. Add an explicit variable.
This fixes a crash on rmmod dereferencing the wl->current_dev NULL pointer
in various other places of the driver.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Michael Buesch
2009-09-14 23:22:08 +02:00
committed by John W. Linville
parent 9308779aad
commit e899a3f232
3 changed files with 5 additions and 5 deletions

View File

@@ -4987,7 +4987,7 @@ static void b43_remove(struct ssb_device *dev)
* might have modified it. Restoring is important, so the networking
* stack can properly free resources. */
wl->hw->queues = wl->mac80211_initially_registered_queues;
wl->current_dev = NULL;
wl->leds.stop = 1;
cancel_work_sync(&wl->leds.work);
ieee80211_unregister_hw(wl->hw);
}