From patchwork Mon Jul 19 14:55:11 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: 480041 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4297982jao; Mon, 19 Jul 2021 09:44:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0+Im2aifZEvywKr+6DFCZn3Zfsa4W4OuK+C0Hc/5wz9ZhEir7+4b0B+/d20Jv9Okv7lrm X-Received: by 2002:a17:906:4098:: with SMTP id u24mr27956473ejj.462.1626713073930; Mon, 19 Jul 2021 09:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626713073; cv=none; d=google.com; s=arc-20160816; b=lpikLiNK7V6cRGVtTTzrM4MboAFtL0lxNdwtJm3LBMpL+eQQNYQuHSgphNHMfU6jLH bNOysnQbia3Xswfo72xns+Z3vdkqUR9yeR5MqsMjAwVaMnd9l/PFByh9Iwhhn89vuO3/ ox7y9X4m+HcIDMKZqbza9ngfqycAlysbafGCbe8kKlW4zapB0gpR9Zil9WEPcqUe43iX T3MR8my2Jhf69xbw2tdQI4DlUzlBoJe0nwIVmOLHnuvRCZbJ8aoXYWRvxcYJjrhR9fGm 4ehp8pJP0j+Cor72Qh4sPSf5vDtP80/SpJCdoo980OkfKBRp7bRPhgDOe6cMAG+/JcdJ 0tsw== 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=aZelzUUyY35it950CoCwqMAbyzDmr8nCedgE9sgnLiy4eNWLEfmcCWgPXrqh1Jrmua gpyxS6LunFK+FG39yUnZOjksddRsjj0jcAWi40xafXjN1//8Mhh0kIYtXjQT+Fd3gj2l 1GW3E3niAaKxH1wkzyUIXDvSpOXBWdw0d8ISuk5mtrjCPr7hze1ay5yLnb3gWYCsUfwW hRkd9486Ssom+Ba1+wg31y94CZlc50YaC7U7/tL12FPJEafOa17EgUwlpNq5xzGLZ/c4 1wr9wD++pw8toyB5zCX+idpZOqH9SRtJjuitDo1Dm/pncq1A0/nI6cxJ5g2ol2Mh96L4 6lsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NaHSJNDD; 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.44.33; Mon, 19 Jul 2021 09:44:33 -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=NaHSJNDD; 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 S1347312AbhGSPzZ (ORCPT + 12 others); Mon, 19 Jul 2021 11:55:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:49524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347955AbhGSPss (ORCPT ); Mon, 19 Jul 2021 11:48:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 987846147D; Mon, 19 Jul 2021 16:28:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626712098; bh=YhXSwoh8bMN8/Mbo0txirRqP3/npuOXCLagUFhi2wV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NaHSJNDDYIWCrvkiWefGv3TOfjXP2J4EFdqhyaCo84gYIAoVezyFjZmjYl6DHnGTA FzrJsG+2zyQqLDaPjZ/fqRanHjU3bX4ba6Cn8mP6Q5NlEaxC0B8xFYPIE0cg8AXaHY rfDxrzwYBj3byXjIs9WmXo8jDSpt6Y6gUtJhLx7k= 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.12 249/292] firmware: tegra: Fix error return code in tegra210_bpmp_init() Date: Mon, 19 Jul 2021 16:55:11 +0200 Message-Id: <20210719144951.136336744@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.514164272@linuxfoundation.org> References: <20210719144942.514164272@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");