summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-08-03 12:24:53 -0700
committerJohn W. Linville <linville@tuxdriver.com>2009-08-04 16:44:32 -0400
commit3ce1b1a949ae849fb73556867e60977a65ca3141 (patch)
treeffe20f50aff552c1367b7e8640864ddd192c8e50 /drivers/net/wireless/ath/ath9k/main.c
parent9db6b6a25fd829a0d29480785ac0770a1e76f9a4 (diff)
ath9k: set sc->sc_ah to NULL after freeing it
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 91bffc91bbb..d3d2cb667dc 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1278,6 +1278,7 @@ void ath_detach(struct ath_softc *sc)
ath_tx_cleanupq(sc, &sc->tx.txq[i]);
ath9k_hw_detach(sc->sc_ah);
+ sc->sc_ah = NULL;
ath9k_exit_debug(sc);
}
@@ -1521,6 +1522,7 @@ bad2:
bad:
if (ah)
ath9k_hw_detach(ah);
+ sc->sc_ah = NULL;
bad_no_ah:
ath9k_exit_debug(sc);
@@ -1631,6 +1633,7 @@ error_attach:
ath_tx_cleanupq(sc, &sc->tx.txq[i]);
ath9k_hw_detach(sc->sc_ah);
+ sc->sc_ah = NULL;
ath9k_exit_debug(sc);
return error;