Commit 48a7c3df authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville

ath9k_hw: Fix memory leak on ath9k_hw_rf_alloc_ext_banks failure

The allocated externel radio banks have to be freed in
case of ath9k_hw_rf_alloc_ext_banks failure.

Cc: stable@kernel.org
Signed-off-by: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 490b3f4e
...@@ -484,6 +484,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah) ...@@ -484,6 +484,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
"Failed allocating banks for " "Failed allocating banks for "
"external radio\n"); "external radio\n");
ath9k_hw_rf_free_ext_banks(ah);
return ecode; return ecode;
} }
......
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