Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp105250pxb; Mon, 13 Sep 2021 14:14:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKrEo3MKm5mycEEXCtb8b2SiZZ1gi4NfZehWnCsgksHBxaqLmuzhoQTeH4EmC9JHw4/YKu X-Received: by 2002:a05:6402:1057:: with SMTP id e23mr15738601edu.352.1631567647277; Mon, 13 Sep 2021 14:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631567647; cv=none; d=google.com; s=arc-20160816; b=xT6lA2vZs2S/BO+Mr07gK7l0ZjXzx3mz8M8n5Q+926pLfqPUvRKrZ33IKTmc/UT/zV +L9VnURg6E9ORvgXCAiQvQFlSEaMxv8GJKMZePtgUUhLuUesanMue+ndlMEcTzhXi1Ge TwhQmwFewE84RZitPt1K/0KV5y1dBVPkmdx2LDgGUcuqSTnLvELPO7dPL6NyC9I5ZqyW QosSEk4XPgCptokPuaVdK1jvBKABTzp8y/lh14FyyVGdqKeo8onaWExoKBA0tBfVyr4z 8ndymWuDJg3LR6nwfs5yYvdDZzL0eYoV7R3aGtc3GffmmTG4mYESE6zD2Siz+7LwwmDS oK8Q== 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=yrN0ayxernsLZjVPnE0H1YYthMWEeliY/Vp9ZvzdgxA=; b=pBV7lYLfgDn4TK1ibWnSoyz+yWJ2vkQTDgEl6DoeUMUVssRROTpi6OzsNpd2SjINAz RSMzWfmkISo/MYNdED0unIHTxRxrOcLOEmN7BV6GdA2eQh/KPz35Roi7rtB1I/JxPRTs XON+DNDxuSbauWkXTDFDKnwV8wgadT+Tlk6nH/ECCH0zza8wCQ11s6nhiTY0kEuP5lUU BU/Zvr0pWtlX54vk4mVv6sPYt2HubkcMGTKbnrWQBoTIh45III6iupVYqrmzjx5psIfL miVHnZk3uXLpSN7RLGZ4aloViixiVLqt9Eg6W4IL9IH2NBq0+ywhcXkIQ+OQA1HBlk2Z 4gRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="jG/vyAfe"; 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 i25si9846979ejd.625.2021.09.13.14.13.43; Mon, 13 Sep 2021 14:14:07 -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="jG/vyAfe"; 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 S243260AbhIMNxU (ORCPT + 99 others); Mon, 13 Sep 2021 09:53:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:56778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244533AbhIMNtd (ORCPT ); Mon, 13 Sep 2021 09:49:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1F609615A6; Mon, 13 Sep 2021 13:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539995; bh=G4O6mKo8fLiIpWNAmD4216GAL19NqNIp9YAlUI256IM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jG/vyAfeeYGIb1wUFFj2OIeMGKBRIHaifRYaMoljHEa0q/tMeVAtVh5UtQApZVCrA OJTiQ+m8zWywkRi7ZKX75eiraCrvJWhGz0CAx3okvB/LVmRz1OGi2VWL8f6T7uZpp9 GGCnDZHdc+uQikJFLobj8iRltg63mvdp9Ez/n48g= 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.10 203/236] ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point() Date: Mon, 13 Sep 2021 15:15:08 +0200 Message-Id: <20210913131107.289663680@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 dbc47702a268..5bacddee8344 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -2504,8 +2504,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