mirror of
https://github.com/torvalds/linux.git
synced 2024-12-17 08:31:39 +00:00
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>
This commit is contained in:
parent
9db6b6a25f
commit
3ce1b1a949
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user