Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp36688pxb; Mon, 13 Sep 2021 12:15:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyho2zgcKPSURAtQL/dd6gERneJN7UuHYBsLwwRSIwX4ie1aH98auLvw/p35mewMtRLk9qc X-Received: by 2002:a17:906:1e97:: with SMTP id e23mr14173738ejj.336.1631560521132; Mon, 13 Sep 2021 12:15:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631560521; cv=none; d=google.com; s=arc-20160816; b=GWCeArJT+ZhtpFtlQVKJnponSdRSI5/F8+XmVydvk7TcSb4hYaDYvo9zQ7eYf64g1p yIcsrnow/TNv8NYwpPOw8jor27aROF30YH9s3TlK2BTRbYiQkiu42+fIrgyLd0T7TyX3 GsazYjHmUKeVV5SJUMfqIfAs+uiLjkHJRw55Neocybd7rqspeq+aGiQDJwpN44qnQjf2 VIoK8RKDn+EO2XQJAfxJQG1i553AdNZelmnBP+dJgpgGorVDq+i1/pwAndBnuHTxeyE9 6buZ4l5xjyk/QUpp802j+6OHwOIy9FFvotdhyjtZI/5k+gMy/quLfzda8/fTrzw68hL9 Sz9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hgJqAmdHKfHB5473vJvdQrjdyPzmP8NUDR0G/GwLImM=; b=BL3e0Ajnl67DVo3//QWtAKt2EBozBj6MV70G650t/YG8zNMVqfJH09kO/y3PjvxdCv 96Rn604wI93+9RkB1UGEX5pKVhePh0BZ9SZsPGWFZOY6XAoYkoQ65jTl+Pq8t+9dmPFS sA6gGJOcd8Hx0bFVk2hy4wX+eOvpteN6OkgGmZltoStD52DmUkMmyhWKjghFkrP2Gb0x QJo+AoLSr+FpgTBHHQr2YvSDULh0l57cCXvdaren+vd1hnR1wnF9Rqp0rdJArmr6FBFl N8x/D43ogd9UAWfBAhy5uNppzMU4LU5NuAcsB9BOWLoAdP+Mc6ZubqtsH6K/p6LtC5aR juNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="xNABp3B/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qa10si8498657ejc.678.2021.09.13.12.14.56; Mon, 13 Sep 2021 12:15:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="xNABp3B/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240713AbhIMNdM (ORCPT + 99 others); Mon, 13 Sep 2021 09:33:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:35046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241358AbhIMNX4 (ORCPT ); Mon, 13 Sep 2021 09:23:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5E697610CE; Mon, 13 Sep 2021 13:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539304; bh=RU8S49y9RZJ3yRrZ4s7MBNustncI3PBe2pimAyGOKjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xNABp3B/X5r5z2hZSO5Lp1LeASUM2Ekkki5FrcUgU8nf9JlwBtsUvx5Q550A8VDGb 4/b29hpHfBs1q0IqKfM3RF1FTx+jqZTF/mKTMxpHolZSpRRsXT5MdmVE8x8WTtee1Z 4olH5yfwuODE03MnKLe1Z0Il51NPKwPCyBJi27Vc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 118/144] ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point() Date: Mon, 13 Sep 2021 15:14:59 +0200 Message-Id: <20210913131051.875371346@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit fd6729ec534cffbbeb3917761e6d1fe6a412d3fe ] This error path is unlikely because of it checked for NULL and returned -ENOMEM earlier in the function. But it should return an error code here as well if we ever do hit it because of a race condition or something. Fixes: bdcd81707973 ("Add ath6kl cleaned up driver") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210813113438.GB30697@kili Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath6kl/wmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index c610fe21c85c..31ffec3a5972 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -2510,8 +2510,10 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx) goto free_data_skb; for (index = 0; index < num_pri_streams; index++) { - if (WARN_ON(!data_sync_bufs[index].skb)) + if (WARN_ON(!data_sync_bufs[index].skb)) { + ret = -ENOMEM; goto free_data_skb; + } ep_id = ath6kl_ac2_endpoint_id(wmi->parent_dev, data_sync_bufs[index]. -- 2.30.2