From patchwork Fri Jun 19 14:29:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 11614315 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5D3D14E3 for ; Fri, 19 Jun 2020 14:30:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8422D2078D for ; Fri, 19 Jun 2020 14:30:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VgDA9Qug"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="dXxPQTrf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8422D2078D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:To:From:Date:Message-ID: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5vhpL9kDpx6ud3SreWhszVN1IxKBC2ec6nPs96VTzUw=; b=VgDA9Qugu7YhB6 LA65ftNXAQo3xSqdd1Q1Rj4aRK6hF2ehrhiyFUmHPK5J+kdsM8vwZ3ito2Uk6GJ0w4VQJqzMJh1vA x7r+5AD/XjXHAIptG4UcdAjTuZFf8bS1U3lRFVDH2oakNGAq4Eo8Sdrpwrabhv2Igzt+uVjbc/weK vn38/YjHuWD6iDRuEFKgFzX1GkBEOW1bzXxJ8f0MuQYzxNhJ22GU7SOrCBJc8RPjQyFSEmtB9ACUv fRlLnzywJrTEcdp6KI62zzLHwretWPkRfyQZhdVrCfs3gIAenpoVbi8a45Qw/a1OIMOfbg39LJZtZ P609cW8F2i98pQsT45Uw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmI1w-0006yx-Tb; Fri, 19 Jun 2020 14:30:08 +0000 Received: from aserp2120.oracle.com ([141.146.126.78]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmI1u-0005bf-5B for ath11k@lists.infradead.org; Fri, 19 Jun 2020 14:30:07 +0000 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05JEDIFx158879; Fri, 19 Jun 2020 14:30:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : to : cc : subject : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=B/h4/Smp0b+GZtYXT6WoZKLL0Di7be3tZw+sca6yhxU=; b=dXxPQTrfkwbSmVjHZu3Y0c+Jap5JtawE0xiYy7epxZj/QQqeTULL7gf0U8U24Cgk7yOk Is04EMvpx9/lhlDucePvHb5TE+DZtvWKjaFdXEHUS68hp4JZdhx8oAIHsizZqUn14RfM zD3LsKO961e41aN52dc53PPjaGaSU0OaiPgpxrkGxPVQsrDrsqwcHbabT4ccykm4jlwq u3krZgjb2wvkIsohYtKtLHWxVLTFLncy5Yw/NR8+/XU10bfUzH+UvFtufNiyeHxlylN+ MUmJSC1XpQsZD8E1vlHtq0/BxtYK20jXV42wBHR+Q4QwQm/VY3OryxYv2+g5K7SStS5z 5g== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 31qecm5ju6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Jun 2020 14:30:00 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05JE9Og7111375; Fri, 19 Jun 2020 14:30:00 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 31q66vm0j8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Jun 2020 14:29:59 +0000 Received: from abhmp0022.oracle.com (abhmp0022.oracle.com [141.146.116.28]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 05JETw3q008177; Fri, 19 Jun 2020 14:29:58 GMT Received: from mwanda (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 19 Jun 2020 07:29:28 -0700 MIME-Version: 1.0 Message-ID: <20200619142922.GA267142@mwanda> Date: Fri, 19 Jun 2020 14:29:22 +0000 (UTC) From: Dan Carpenter To: Kalle Valo , Karthikeyan Periyasamy Subject: [PATCH net-next] ath11k: fix uninitialized return in ath11k_spectral_process_data() X-Mailer: git-send-email haha only kidding X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9656 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 bulkscore=0 adultscore=0 phishscore=0 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006190106 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9656 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 cotscore=-2147483648 malwarescore=0 clxscore=1011 adultscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 phishscore=0 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006190106 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200619_073006_298995_66C51974 X-CRM114-Status: GOOD ( 13.23 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [141.146.126.78 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [141.146.126.78 listed in wl.mailspike.net] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jakub Kicinski , kernel-janitors@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org There is a success path where "ret" isn't initialized where we never have a ATH11K_SPECTRAL_TAG_SCAN_SEARCH and then ret isn't initialized. Fixes: 9d11b7bff950 ("ath11k: add support for spectral scan") Signed-off-by: Dan Carpenter --- drivers/net/wireless/ath/ath11k/spectral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/spectral.c b/drivers/net/wireless/ath/ath11k/spectral.c index 1c5d65bb411f..bfbf905f7507 100644 --- a/drivers/net/wireless/ath/ath11k/spectral.c +++ b/drivers/net/wireless/ath/ath11k/spectral.c @@ -677,7 +677,7 @@ static int ath11k_spectral_process_data(struct ath11k *ar, u32 data_len, i; u8 sign, tag; int tlv_len, sample_sz; - int ret; + int ret = 0; bool quit = false; spin_lock_bh(&ar->spectral.lock);