Commit 3ce1b1a9 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

ath9k: set sc->sc_ah to NULL after freeing it

Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9db6b6a2
...@@ -1278,6 +1278,7 @@ void ath_detach(struct ath_softc *sc) ...@@ -1278,6 +1278,7 @@ void ath_detach(struct ath_softc *sc)
ath_tx_cleanupq(sc, &sc->tx.txq[i]); ath_tx_cleanupq(sc, &sc->tx.txq[i]);
ath9k_hw_detach(sc->sc_ah); ath9k_hw_detach(sc->sc_ah);
sc->sc_ah = NULL;
ath9k_exit_debug(sc); ath9k_exit_debug(sc);
} }
...@@ -1521,6 +1522,7 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc) ...@@ -1521,6 +1522,7 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc)
bad: bad:
if (ah) if (ah)
ath9k_hw_detach(ah); ath9k_hw_detach(ah);
sc->sc_ah = NULL;
bad_no_ah: bad_no_ah:
ath9k_exit_debug(sc); ath9k_exit_debug(sc);
...@@ -1631,6 +1633,7 @@ int ath_init_device(u16 devid, struct ath_softc *sc) ...@@ -1631,6 +1633,7 @@ int ath_init_device(u16 devid, struct ath_softc *sc)
ath_tx_cleanupq(sc, &sc->tx.txq[i]); ath_tx_cleanupq(sc, &sc->tx.txq[i]);
ath9k_hw_detach(sc->sc_ah); ath9k_hw_detach(sc->sc_ah);
sc->sc_ah = NULL;
ath9k_exit_debug(sc); ath9k_exit_debug(sc);
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment