diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-01-06 12:58:16 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-13 14:40:50 -0500 |
commit | ccde8a45cbd3ea9a6e785e4393d3a1f6b4e6b495 (patch) | |
tree | 15e7011f8a11f0ade53f0704093abd596e6d2f42 /drivers/net/wireless | |
parent | 099469502f62fbe0d7e4f0b83a2f22538367f734 (diff) | |
download | blackbird-op-linux-ccde8a45cbd3ea9a6e785e4393d3a1f6b4e6b495.tar.gz blackbird-op-linux-ccde8a45cbd3ea9a6e785e4393d3a1f6b4e6b495.zip |
wireless: b43: fix Oops on card eject during transfer
An Oops has once been observed, when the SDIO card had been ejected during
IO. The PC value shows, that the dev pointer in b43_op_stop() was NULL.
(I moved the NULL check before the lock, based upon a suggestion from
Julian Calaby <julian.calaby@gmail.com>. -- JWL)
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 1c6f19393efa..b91f28ef1032 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -4852,6 +4852,9 @@ static void b43_op_stop(struct ieee80211_hw *hw) cancel_work_sync(&(wl->beacon_update_trigger)); + if (!dev) + goto out; + mutex_lock(&wl->mutex); if (b43_status(dev) >= B43_STAT_STARTED) { dev = b43_wireless_core_stop(dev); @@ -4863,7 +4866,7 @@ static void b43_op_stop(struct ieee80211_hw *hw) out_unlock: mutex_unlock(&wl->mutex); - +out: cancel_work_sync(&(wl->txpower_adjust_work)); } |