From patchwork Wed Apr 27 10:56:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 8954891 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D7FB5BF29F for ; Wed, 27 Apr 2016 10:56:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DE172022A for ; Wed, 27 Apr 2016 10:56:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB92C20219 for ; Wed, 27 Apr 2016 10:56:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752862AbcD0K4o (ORCPT ); Wed, 27 Apr 2016 06:56:44 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:24819 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752502AbcD0K4n (ORCPT ); Wed, 27 Apr 2016 06:56:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1461754603; x=1493290603; h=from:to:cc:subject:date:message-id:mime-version; bh=9gJnJxoCpxWIeSwplIbmWkJrLQNH3rpWTzcmW/F11UQ=; b=rjs2YiUCA7wp7Y18i8hR3FmcnsGjrCWBBlOMYMohUHm33lkvzFdpExSf UhTyMNF6CE1kQd0tpvX9W3vdtovVpIxehZleBIbabII+AhUkgWFNBD0Bk z0FqV+0qIUJb1FP4mPHUZ2NTsS0+dRLOSB+4fZVX9q5kWb0ABRBu7BVgT U=; X-IronPort-AV: E=Sophos;i="5.24,541,1455004800"; d="scan'208";a="283762731" Received: from ironmsg03-l-new.qualcomm.com (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Apr 2016 03:56:42 -0700 X-IronPort-AV: E=McAfee;i="5700,7163,8147"; a="1139543951" Received: from nasanexm02b.na.qualcomm.com ([10.85.0.42]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 27 Apr 2016 03:56:42 -0700 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by nasanexm02b.na.qualcomm.com (10.85.0.42) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Wed, 27 Apr 2016 03:56:41 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Wed, 27 Apr 2016 16:26:34 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Wed, 27 Apr 2016 16:26:26 +0530 From: Rajkumar Manoharan To: CC: , , "Rajkumar Manoharan" Subject: [PATCH v2] ath10k: release pre_cal_file while unloading driver Date: Wed, 27 Apr 2016 16:26:26 +0530 Message-ID: <1461754586-7928-1-git-send-email-rmanohar@qti.qualcomm.com> X-Mailer: git-send-email 2.8.0 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To aphydexm01b.ap.qualcomm.com (10.252.127.11) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Failing to release pre_cal_file caldata on deinit causes memory leak. Fixes: b131129d9657 ("ath10k: fix calibration init sequence of qca99x0") Signed-off-by: Rajkumar Manoharan --- v2: rebased drivers/net/wireless/ath/ath10k/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 3c38adafcc7a..dcc1c2ec14f7 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -686,6 +686,9 @@ static void ath10k_core_free_firmware_files(struct ath10k *ar) if (!IS_ERR(ar->cal_file)) release_firmware(ar->cal_file); + if (!IS_ERR(ar->pre_cal_file)) + release_firmware(ar->pre_cal_file); + ath10k_swap_code_seg_release(ar); ar->normal_mode_fw.fw_file.otp_data = NULL; @@ -696,6 +699,7 @@ static void ath10k_core_free_firmware_files(struct ath10k *ar) ar->normal_mode_fw.fw_file.firmware_len = 0; ar->cal_file = NULL; + ar->pre_cal_file = NULL; } static int ath10k_fetch_cal_file(struct ath10k *ar)