diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 3 |
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: | |||
1521 | bad: | 1522 | bad: |
1522 | if (ah) | 1523 | if (ah) |
1523 | ath9k_hw_detach(ah); | 1524 | ath9k_hw_detach(ah); |
1525 | sc->sc_ah = NULL; | ||
1524 | bad_no_ah: | 1526 | bad_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; |