ath9k_hw: Fix memory leak on ath9k_hw_rf_alloc_ext_banks failure

commit 48a7c3df14 upstream.

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

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Rajkumar Manoharan
2010-11-08 20:40:53 +05:30
committed by Greg Kroah-Hartman
parent 78e8b99c3f
commit cd4d6dacab

View File

@@ -486,6 +486,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
"Failed allocating banks for "
"external radio\n");
ath9k_hw_rf_free_ext_banks(ah);
return ecode;
}