From patchwork Mon Jul 19 14:53:56 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: 479983 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4255111jao; Mon, 19 Jul 2021 08:53:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypQ7kq9Ns8KZUumlomSpNpr8qnVGJXtcR61/h2vKQJyIGq9v3p9YSIfk1q6InOCt8IJR/8 X-Received: by 2002:a17:906:9742:: with SMTP id o2mr28034071ejy.532.1626710035431; Mon, 19 Jul 2021 08:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626710035; cv=none; d=google.com; s=arc-20160816; b=P3ORUn0E244W7jt9crwDz7SQzYYP0HPdszmZ0PqGAOHFSc6sj7X8ZOx3Y0md6KZGmZ poi3LX2df9R1MJ9FYQUCxocIZ+XrSYBpY1bxnAMB/uwhQQtG5HulllMjOXJ2OxcUKGZZ JUensgU0Ne/8CwIixFPcKgzBjHM2/Ce+kKz56HAdC/lj74ccIGQ6YfTJSMUcQKqzsLqO rPkTnfg8zxZSQ/fKYfy2T7NVZIMXMnGN5/u+J0L15NiE7bLoZd5jVQ9d2NM1Z8ZMB6+o U9qXwwsSCghu9tu7hjdcuF8r1e4XrPD5J/pL87fw655XBCCEq+jU5LjOGXm0BiYFy39R aQ4w== 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=y7JE1rxQVYBa9AL1NjVzw25p4sLveDXdncoXhDJyos2+i78O4gH73b8jqAtjIPEyM/ BDUjFeGqkKes/4KPIUy84Q1czxOVXnPP1mZzanfsEhXZltFnqUBPbfcQoGEltzPPThH6 Orit9mLYHkZUTglHkcCj1pLBQRNJnh7LvmByuPcXA2Z6MDiAUcd6XdZzYcpFOcImI/wV O9MmHgOUyIRDB+cRT8bMYBFiceTYdcRQqwY5WuB2zna2vvuf/YGsEpS0cUGpWZE6vTlx 81hEkP5ElLgFwpl5zg99n7xgn7On1bgCrdzOyfF+kVw49WAmCzz24N1Eqvi6D48QLsZn /u9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FroporIx; 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 z16si26773967edm.47.2021.07.19.08.53.55; Mon, 19 Jul 2021 08:53:55 -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=FroporIx; 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 S1345440AbhGSPNE (ORCPT + 12 others); Mon, 19 Jul 2021 11:13:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:49366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345439AbhGSPLh (ORCPT ); Mon, 19 Jul 2021 11:11:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D14D606A5; Mon, 19 Jul 2021 15:52:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626709936; bh=YhXSwoh8bMN8/Mbo0txirRqP3/npuOXCLagUFhi2wV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FroporIxL332e983QRZRG8aqfTOY8be6npb2rN0mrOJBOmuxTxRYJSdyfb3k4mDPb AwETZ8OAibyVbHJ/0kJZ9UYOMXSqwo09nGpQerburKw3gZUZAuUrpyWs+l5yjxfjzP AJbofD/C5dbueCiWEfnm91XY3bw7FgAcsIOEcedg= 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.4 128/149] firmware: tegra: Fix error return code in tegra210_bpmp_init() Date: Mon, 19 Jul 2021 16:53:56 +0200 Message-Id: <20210719144931.629873797@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144901.370365147@linuxfoundation.org> References: <20210719144901.370365147@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");