Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2318989pxb; Mon, 20 Sep 2021 18:41:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpQ+3+DblMlXG0jdydbBkgK4gOqVlbMlL2HvnejFplXK7g+NhmYLIzb/zk6tjR1UwtIpo+ X-Received: by 2002:a05:6638:204c:: with SMTP id t12mr21716290jaj.9.1632188499531; Mon, 20 Sep 2021 18:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188499; cv=none; d=google.com; s=arc-20160816; b=iOFSrK6WisUL0rmyrO9sW4qG3H2UxI681DnZ8NgvtXGRjL/YA1ydcDkbmdTCxoUDFy qInf/WqtM6a2ElWsXo9O9ycSz0se3PSIhnaIaM1aSn8WB8dYoGmksj8QKtnRqfURqrIW JO0xCoNm/3s6a7Oebxc+ipXFL31OBsNNxQwMW1nU/mF+X2Z7PrMYwdaNlg+DIMND9A98 FbF3pIKoEJ0bGPW2BcZ76iYjG88ekxTTkBo3SblXhDH/18U1ycRQ9PWzX+ZtI293gQIR 4g6ot82niqyHqBpswY9BCVOtNJRNqzdrfd5Vo4pCa92Mt+2HxzAqeGge611GxdNpPYlq aowg== 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=cuFlc11c8VmzCb4C7FWhLzS3+gu4OBnBoQMQ6KzFCiI=; b=KwETeXWGQWTICJhvfzSszzjKyA0DLZqnMbql03UrkHKtdpB8CEC0O5D94j6/IhwruF WDULVv8aE4R/5rz6j3zH7EtuTr29LO0UxwU79pK0ow3oWzNmq3NR3QttOiWC/j4y2uGL QBjxDkVk5Tbx48kECOc+KYr4n3D4J2auOKVaJex7HCiSjY4iARmvm7pNm5t7U39Q8vx8 KFca11kyKffZC9psTUGTrDc35By64+vdrW6qwAkZJJ24rD4TvOVid9jjT7miw0WX8zFq LT9RmXBTs2X46qelBttVi6G6garRr6boNzK6BwWjlpECoJ30x01JUh0kdd7/avcff/5l 9wWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p1DPSArf; 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 h11si14432253ior.13.2021.09.20.18.41.28; Mon, 20 Sep 2021 18:41:39 -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=p1DPSArf; 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 S244149AbhITQuL (ORCPT + 99 others); Mon, 20 Sep 2021 12:50:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:36770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240442AbhITQtE (ORCPT ); Mon, 20 Sep 2021 12:49:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9336960F6E; Mon, 20 Sep 2021 16:47:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156450; bh=CIKTzQK4SW+tNg6ZnnS3KIZMCYc5yLGjNKHn83PhXFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p1DPSArfashyWq/AigEvXKy8i24SIWNSZltUCz/6+FdVtzvE1WlWgdhffUAIBlYNe ci4DPDZxU44bCTUlhJuoMYP8H/RFhA9ArW8Mvp4hwFlGzTLqHAhpTRRKJ2+HKuXQ8W ZEFzIwGZheTZP1o3K9YIUd5IP4iEh88CxtMzj4So= 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 4.4 065/133] ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point() Date: Mon, 20 Sep 2021 18:42:23 +0200 Message-Id: <20210920163914.776001575@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@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 7e1010475cfb..f94d2433a42f 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -2508,8 +2508,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