From patchwork Mon Mar 28 20:57:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 670052 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2SKvpoS016180 for ; Mon, 28 Mar 2011 20:57:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754843Ab1C1U5s (ORCPT ); Mon, 28 Mar 2011 16:57:48 -0400 Received: from mail.atheros.com ([12.19.149.2]:26473 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754817Ab1C1U5s (ORCPT ); Mon, 28 Mar 2011 16:57:48 -0400 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Mon, 28 Mar 2011 13:57:24 -0700 Received: from tux (10.10.10.239) by SC1EXHC-01.global.atheros.com (10.10.20.111) with Microsoft SMTP Server (TLS) id 8.2.213.0; Mon, 28 Mar 2011 13:57:47 -0700 Received: by tux (sSMTP sendmail emulation); Mon, 28 Mar 2011 13:57:45 -0700 From: "Luis R. Rodriguez" To: CC: , Mohammed Shafi Shajakhan , , "John W. Linville" Subject: [PATCH 9/9] ath9k: Fix memory leak due to failed PAPRD frames Date: Mon, 28 Mar 2011 13:57:15 -0700 Message-ID: <1301345835-11401-10-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.7.4.15.g7811d In-Reply-To: <1301345835-11401-1-git-send-email-lrodriguez@atheros.com> References: <1301345835-11401-1-git-send-email-lrodriguez@atheros.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 28 Mar 2011 20:57:52 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 1049313..16b8e36 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -384,8 +384,11 @@ void ath_paprd_calibrate(struct work_struct *work) init_completion(&sc->paprd_complete); ar9003_paprd_setup_gain_table(ah, chain); txctl.paprd = BIT(chain); - if (ath_tx_start(hw, skb, &txctl) != 0) + if (ath_tx_start(hw, skb, &txctl) != 0) { + ath_print(common, ATH_DBG_XMIT, "PAPRD TX failed\n"); + dev_kfree_skb_any(skb); break; + } time_left = wait_for_completion_timeout(&sc->paprd_complete, msecs_to_jiffies(ATH_PAPRD_TIMEOUT));