|
@@ -1227,7 +1227,7 @@ void ath9k_hw_deinit(struct ath_hw *ah)
|
|
|
{
|
|
|
struct ath_common *common = ath9k_hw_common(ah);
|
|
|
|
|
|
- if (common->state <= ATH_HW_INITIALIZED)
|
|
|
+ if (common->state < ATH_HW_INITIALIZED)
|
|
|
goto free_hw;
|
|
|
|
|
|
if (!AR_SREV_9100(ah))
|
|
@@ -1238,8 +1238,6 @@ void ath9k_hw_deinit(struct ath_hw *ah)
|
|
|
free_hw:
|
|
|
if (!AR_SREV_9280_10_OR_LATER(ah))
|
|
|
ath9k_hw_rf_free_ext_banks(ah);
|
|
|
- kfree(ah);
|
|
|
- ah = NULL;
|
|
|
}
|
|
|
EXPORT_SYMBOL(ath9k_hw_deinit);
|
|
|
|