Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3868132pxv; Mon, 19 Jul 2021 10:40:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/FK/QXr2Hf3Qp0835xRI5to7d9Bk6YMOVCP7dVHSDXkFB2D9TLGTGoc4x+0IP797rHvO+ X-Received: by 2002:a17:907:e9e:: with SMTP id ho30mr28812823ejc.114.1626716290315; Mon, 19 Jul 2021 10:38:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626716290; cv=none; d=google.com; s=arc-20160816; b=ZAuJJQMPsKAmd+JmDbPEHUrWCNnoVy8bz1SCbqYddz063Cx0EocBr4mwmKW3ERShBP 2/PwzbQYbx+BVHhcof5akB006PBjU7+CDDwDdTEPI6cv/oSKQTlD888tRNw1QBysq8yF n99B5vY8+hSE7pkFZ4Nkfx21CFrn+cs3fwv2Eodtxs6xdK2WFsQDqRvzUYugwhTptGnh aeToA8uVBNBmJtN8QfHMU589x6/pUKEvldqRtY/4Bj6FBCdFIYC7usMiMHvCd7pMKmRp 6f53/jBpdGE8yJ/T4HTRmOFSHO3Dg+n0Yu/J3zp0pfk47mvhl3ECzj1HqmSwYwC1JqzE /FJQ== 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=YgYBlPrQVKYjFoOvJRuh/2wc9RkxVcvEYtEUaPgLqrg=; b=pMiMt3hcLjUkbOpXHhmKzR/J46ZX36FG5oDn8gvmusdXS26HAy7fQ6IsiCXJ3bquQ7 DWH28ZA46s/mNlGl1RNQbXGGkNUgkyRMU1IqAw0iV7I4c4hNvcZFmWJgaZHWb+G5AOqw YsFd75cYQgnRfWYojqUZBIRX82thX72JvIXWrQ5fVcKR9ojS2HamchSCWvXm/z70XH9q O9WFVtjSZUK3y1PZG68pLtQl/NzItKjJ7rITYut32EFpNsRgsw0/0pRJ/JDnkn+5gK54 JZ/oauB5jv2M7z9HWdaJJN7tmJYfAVbWxSY/kq1jKw3JCIp/EVYynYMYWCQfFQEsFI5L R+Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q8y3VN3L; 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 nb22si2755260ejc.347.2021.07.19.10.37.47; Mon, 19 Jul 2021 10:38:10 -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=q8y3VN3L; 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 S1358189AbhGSQww (ORCPT + 99 others); Mon, 19 Jul 2021 12:52:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:40774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347993AbhGSPYH (ORCPT ); Mon, 19 Jul 2021 11:24:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06145613D2; Mon, 19 Jul 2021 16:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710424; bh=YhXSwoh8bMN8/Mbo0txirRqP3/npuOXCLagUFhi2wV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q8y3VN3LSw9dAYF9smsKHusHMG+Rns4ZCw71QAbKvSJonzzvQEXatp/HDBP7T7Dsx 3zeAzUIo4/g3pSZ0R1N7wA7OGANAD4eQsfhpBpca/gyw5KWTqHIKxKW2mX+nXzq6eX hvDGEDUE101x/Wf5zmMIPOBtZ4Qos73u9ogBlh5k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Thierry Reding , Sasha Levin Subject: [PATCH 5.10 209/243] firmware: tegra: Fix error return code in tegra210_bpmp_init() Date: Mon, 19 Jul 2021 16:53:58 +0200 Message-Id: <20210719144947.676428057@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@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: Zhen Lei [ Upstream commit 7fea67710e9f6a111a2c9440576f2396ccd92d57 ] When call irq_get_irq_data() to get the IRQ's irq_data failed, an appropriate error code -ENOENT should be returned. However, we directly return 'err', which records the IRQ number instead of the error code. Fixes: 139251fc2208 ("firmware: tegra: add bpmp driver for Tegra210") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/firmware/tegra/bpmp-tegra210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/tegra/bpmp-tegra210.c b/drivers/firmware/tegra/bpmp-tegra210.c index ae15940a078e..c32754055c60 100644 --- a/drivers/firmware/tegra/bpmp-tegra210.c +++ b/drivers/firmware/tegra/bpmp-tegra210.c @@ -210,7 +210,7 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp) priv->tx_irq_data = irq_get_irq_data(err); if (!priv->tx_irq_data) { dev_err(&pdev->dev, "failed to get IRQ data for TX IRQ\n"); - return err; + return -ENOENT; } err = platform_get_irq_byname(pdev, "rx"); -- 2.30.2