From patchwork Mon Jul 19 14:53:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 480003 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4274928jao; Mon, 19 Jul 2021 09:15:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvqa5uwq3L9Pxm9CzbbV4p7X5ncFIpkffkeuG9Uq68rKuWeiad9RjfRkYHQdpMHLU/n3IH X-Received: by 2002:a50:8a89:: with SMTP id j9mr34884110edj.226.1626711264746; Mon, 19 Jul 2021 09:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626711264; cv=none; d=google.com; s=arc-20160816; b=x1a7H1bM4sMsJZeXlyTZQI8xsWuFHqew5ZywOvDviQbat5DtJVEhgm7G/tRkGLFd2t UU+xG87pUdKh0yQM452igmWAwwqhDzeiLic00LWBSE8HtqQCTt8nVql1iJeKBL2LK4i7 oSgkX5WfSZNDCkb3tgTXx0BUurWj7RrS5TBLo4HWecxkhR4QppmZG9XRQJl5U1stMEqP WAaAxi1kQuib6/zYng1vN8N45jO70RUHHuoJhQoBccctBglBCG6sDmliFbghXQgOsuqb DM9yK2MJGRY5TWFLHCJnn/U3uELS9AdwEZLVdMCT/h1qJ4LNv1ABdbQ5hlh9YbZnnsFr f9lQ== 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=CEHHwveZn6EfrDvd85DqNdiQeZHYWkRjq9l4kd73xfF9gd6cjnIJeDHQ/xaC9TWt4O zs3D3FUiB8W5biCIJogqWbtfF26K1F8dgGB/JDO5SKmEB2OQdOt7Gw43MOUmhay9Lsdd sNsQ4ai89mvhr4O+716+DPgrgf4Mf1UtHqKc+N4+I2wdDbPRgy6WP7ynRlus7fh3mQBF xH+RIYw0UIMIIqMFYzcnN8IHdcHtpz+9Ofb9wiFFyipJE7KDrA77BZvtQ9NZQmewBOrA U2LrUMY8iWgNEp6X2QRJn18ceXKXwRYznz6tU2c98dmOJLVto1nsW3MGa4w4ctQbtlty XMLw== 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 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 la14si22045543ejc.142.2021.07.19.09.14.24; Mon, 19 Jul 2021 09:14:24 -0700 (PDT) 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=q8y3VN3L; 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 S245149AbhGSPb1 (ORCPT + 12 others); Mon, 19 Jul 2021 11:31:27 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.30.2 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");