From: Rajkumar Manoharan Date: Mon, 8 Nov 2010 15:10:53 +0000 (+0530) Subject: ath9k_hw: Fix memory leak on ath9k_hw_rf_alloc_ext_banks failure X-Git-Tag: firefly_0821_release~9833^2~79^2^2~256 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd4d6dacabca8a970ccbe35c502943cdd19ef090;p=firefly-linux-kernel-4.4.55.git ath9k_hw: Fix memory leak on ath9k_hw_rf_alloc_ext_banks failure commit 48a7c3df14d0cda850337a9b3f9e667a0b12a996 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 Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 3384ca164562..a5779a775149 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -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; }