Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5069212pxb; Mon, 15 Feb 2021 08:41:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAjYCvBHjYqEzmYuO+tVe/8VT9UEwp/bLOzvni8qb/qGYGSn612ajJpjyVFbr+S0Yc+vAd X-Received: by 2002:a17:906:af15:: with SMTP id lx21mr16469121ejb.139.1613407316607; Mon, 15 Feb 2021 08:41:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613407316; cv=none; d=google.com; s=arc-20160816; b=N0bWCF0k66pcbwdcx09UTZ0QrI35eR6RlNe8lkwzSL86tOSF4kiC5Kxh/bCKWq31j2 3bNTDIZbGFCCpZBuWBSTree2BnsGaKGcNEuux6euOCR6eYHBrGn9BIEiBrxFPWI8hYwA 1tHUpYal9QP/VyRcRZ+AcuFoViBPmZi6NvY9zFVb4Aqc5Y+w38qLyIQlGJSkrynBQi0H 0oetxm2tUD3WjqPLY5XmM2gQKjv1Ggb37MfyqlWTJVEhCOJf20c3UuU/XjyjTzbfPTOd kWUNktrIfLu/hTrOnM5xJk/oQOuv/8G3KChKk+NLhBN41udClQix7/yVsZaZ8lVWHyz7 jYIA== 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=UosDIUPC9DxwtwsA7FtNThP9Ztnl/H01PKM2kSOXei0=; b=lfJBJLfz13SEprFxPVI0Ail8j0Vcwwugnwo6Qp5J//PTTb/7tHm8yEeVk6ZrQoSOX5 hcMbDsw3BHBHWoKL+yQMMoRn1s7a6OviYEl+dLwLWZIGPe39NkIO2f13PT0mnAyla+8K qrsfhjELksY4dlSgfZslDCH7eGVDv5r1i1Ko6vbJ/meLf8RLAEnAgw0le/m3FuofTQlK vZDesxRIvI3yUyWoqtOX/lVo+p25kGwAcKQPdvbIxUd4UDeLR3bc0KYx2mDa+KxbksMC mkTYkb/F0Ofqoag/Z7eUEigj2RbT7pS3ZTcQ3UREv2rP1Z2Efp1buG9agKbLfA8lE1lX SILw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IorEXmu2; 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 a12si12880589edn.568.2021.02.15.08.41.33; Mon, 15 Feb 2021 08:41:56 -0800 (PST) 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=IorEXmu2; 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 S232427AbhBOQiP (ORCPT + 99 others); Mon, 15 Feb 2021 11:38:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:50182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbhBOPhu (ORCPT ); Mon, 15 Feb 2021 10:37:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CD08764E9E; Mon, 15 Feb 2021 15:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403194; bh=KCAOwNu5ccPs1lCxAQElK+NUIAZY9kh3m8TN7iNIFtM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IorEXmu2uICSl4Htz8c3gQPPSoyfmr4uC1L4iFEuYjB8/2qDr9qztBAuvMHGrY/cD e1R2jJTABGLzO4F5D5jAsGRFBqOZOxEctpCl/hqt2dmZPDQqJtgraJgogBu0DX7S4L TKI8CafQ6AoRzEp0pjySFx27QehRgFOygx/e/Tsk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Alex Elder , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 063/104] net: ipa: set error code in gsi_channel_setup() Date: Mon, 15 Feb 2021 16:27:16 +0100 Message-Id: <20210215152721.510515900@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152719.459796636@linuxfoundation.org> References: <20210215152719.459796636@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: Alex Elder [ Upstream commit 1d23a56b0296d29e7047b41fe0a42a001036160d ] In gsi_channel_setup(), we check to see if the configuration data contains any information about channels that are not supported by the hardware. If one is found, we abort the setup process, but the error code (ret) is not set in this case. Fix this bug. Fixes: 650d1603825d8 ("soc: qcom: ipa: the generic software interface") Reported-by: Dan Carpenter Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20210204010655.15619-1-elder@linaro.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ipa/gsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 4a68da7115d19..2a65efd3e8da9 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -1573,6 +1573,7 @@ static int gsi_channel_setup(struct gsi *gsi, bool legacy) if (!channel->gsi) continue; /* Ignore uninitialized channels */ + ret = -EINVAL; dev_err(gsi->dev, "channel %u not supported by hardware\n", channel_id - 1); channel_id = gsi->channel_count; -- 2.27.0