From patchwork Mon Feb 15 15:27:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 382962 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp1174277jao; Mon, 15 Feb 2021 07:42:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZWqTQBUfsFTr5MMrk8TMymyxpzqynNkn1+j0CB3RP3AvAr8KhglmYcH7qYIh4ifbguz2l X-Received: by 2002:a17:906:6943:: with SMTP id c3mr15796505ejs.133.1613403728036; Mon, 15 Feb 2021 07:42:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613403728; cv=none; d=google.com; s=arc-20160816; b=0cuytKQOME0q25H16QaQFNmkW4Wo0vnSGCdFla9gjKCb+Iyj7amqT3er/mncLiDufR sn3IljdKhCphVS8i02r9BOsWQuUVax3TV1Yvyf1VZvui34vdTsuWEtB//bqW7C6Pb0gy 0PWGqunU5+CSKunlcwDKJfy8ZbM/hP8V0ZguacKhtMZ/kknlI8+NOWFAwl7jSGZpS+pd 0i7NYBKiDTL5DCcAPrBToe6rmNavhPZ1yB2hPmnpqGg+tHphjvgYQI5+gKcv6oW+J1D+ 8/8yn9ddWANruKCrlaNBemgDYEkIBhcTIRHdA+1qpREF0aK1EubW17qnvdIXiTp/wxjP uF9A== 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=rmT1GZfzzL1LuvCtmrS8DTAMg4nR0CBsu9zJm9aG4goeVro8x9NM7qqt21gzxcMjFM ijP+P8MAan/yBD+toxM9ZDGtm/k0OzvVy74PWZjxHGK0ykLT3QRpoeaz801NQoJK0p6X XneRvI97P81LwunaNcliLtL6zHtqkGjGaw6Qr+nNsv6qV2qYIX2qXqMzVLcRWLoLngY2 rWaOypAg9LAEn5yTwjTehvXB1YLYMmHvgK5MCVPmUmtlcHL1El6wiIYT5LqamQDS32no V2Y9mVbeGZ9M63bya/JRWt3vhMypn9INt0PRt5/nfCuY2Tbcgo/xWNXInHDb7Urt1CBP xJcQ== 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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 b7si12442700ejz.39.2021.02.15.07.42.07; Mon, 15 Feb 2021 07:42:08 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S231649AbhBOPkj (ORCPT + 13 others); Mon, 15 Feb 2021 10:40:39 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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(+) -- 2.27.0 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;