aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-08-03 15:24:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-04 16:44:32 -0400
commit3ce1b1a949ae849fb73556867e60977a65ca3141 (patch)
treeffe20f50aff552c1367b7e8640864ddd192c8e50
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>
-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 91bffc91bbb0..d3d2cb667dc6 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)
1278 ath_tx_cleanupq(sc, &sc->tx.txq[i]); 1278 ath_tx_cleanupq(sc, &sc->tx.txq[i]);
1279 1279
1280 ath9k_hw_detach(sc->sc_ah); 1280 ath9k_hw_detach(sc->sc_ah);
1281 sc->sc_ah = NULL;
1281 ath9k_exit_debug(sc); 1282 ath9k_exit_debug(sc);
1282} 1283}
1283 1284
@@ -1521,6 +1522,7 @@ bad2:
1521bad: 1522bad:
1522 if (ah) 1523 if (ah)
1523 ath9k_hw_detach(ah); 1524 ath9k_hw_detach(ah);
1525 sc->sc_ah = NULL;
1524bad_no_ah: 1526bad_no_ah:
1525 ath9k_exit_debug(sc); 1527 ath9k_exit_debug(sc);
1526 1528
@@ -1631,6 +1633,7 @@ error_attach:
1631 ath_tx_cleanupq(sc, &sc->tx.txq[i]); 1633 ath_tx_cleanupq(sc, &sc->tx.txq[i]);
1632 1634
1633 ath9k_hw_detach(sc->sc_ah); 1635 ath9k_hw_detach(sc->sc_ah);
1636 sc->sc_ah = NULL;
1634 ath9k_exit_debug(sc); 1637 ath9k_exit_debug(sc);
1635 1638
1636 return error; 1639 return error;