From patchwork Mon Jul 19 14:54:09 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: 480030 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4285891jao; Mon, 19 Jul 2021 09:29:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr8WdWdrEbBAbQ013pxuP6zZiPQ5Onanxla8A9BUWdi+ZJkMv9aX62n2pnKnUT96QxMV4L X-Received: by 2002:a50:a40c:: with SMTP id u12mr17784408edb.20.1626711746908; Mon, 19 Jul 2021 09:22:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626711746; cv=none; d=google.com; s=arc-20160816; b=bP/mEqHbBq01GqJrknNv9QhxCNHUPzcwT4/l66dHIakqF+ZwLxdSsC+SjIps/MbbMh 2frIb7P++0zx669IdlIPgvdPPULz5zQBpQyj5JIxILsx/gnGjwFa5KvS14ebZZ5+mlNa II+sksyLb5m496BlEstOH6cjppDJT7WuV31fli/LMg2DzbftmpX5kJEwAIYGg53Ej2RC d8gJbbT30mpgzsTYFtkmXpnU0lZyx9/2z5CGs6Y5u/WPNQGq9VPyZbJGcpldW9B8PIbV JsDJQn6G2vvTN5Ozwv2p7TFMRKExE95LsYbZmZUfcuF7aPugttprQE0glhyHVXnrH95O qeSA== 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=wRqkk0F5KI83NpRF+Ik9/K/H6P3KNtpChCcFAersVd2z/wUFh5D8Iaqtkhwq4/LRZM Yu3lyYPI/q/Y+XQkvFpI1s1RQciiILeOWf5lQYa7XRQggZslQkF3mP4HA9hEnVolbJ8W 5/Quuio6VeAq4jf2qA1ELFMRgUZQ3Ge+urpVwvMytsYz9KsbJt6JNa5Qo0YDwW/1aSkZ wmgpN57I5yFZeSjdjAOMIQ9bMcGigo2nHXBSHzhZdVuZP6XlYf8ZVooA3cc4XP+2kK9m kgEpkGpsR49eUeFfI6N+rNpZRcUvaTjGk2e+10oodJiz2Z83a0aufvnVR9vr7MjFQioo NE/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eKjfAIUw; 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.22.26; Mon, 19 Jul 2021 09:22:26 -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=eKjfAIUw; 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 S1346455AbhGSPit (ORCPT + 12 others); Mon, 19 Jul 2021 11:38:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:59680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348883AbhGSPfe (ORCPT ); Mon, 19 Jul 2021 11:35:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 76F38611EF; Mon, 19 Jul 2021 16:15:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626711306; bh=YhXSwoh8bMN8/Mbo0txirRqP3/npuOXCLagUFhi2wV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eKjfAIUwxHSRRLY+vOmGO7w7O0JbYVBkHqkJIPWRYVJTCAL9ky6+IfWEGym/8cGE8 MjWFJu9rkNxWkEASnjNo4vQcqMDlAXHEOd8znfCYGpMBGheiJsDY6I7T5izaP/6e+I GogPPzszfKacSbjepi1J95npWzur/AvDOLKSCZWk= 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.13 303/351] firmware: tegra: Fix error return code in tegra210_bpmp_init() Date: Mon, 19 Jul 2021 16:54:09 +0200 Message-Id: <20210719144955.077091721@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144944.537151528@linuxfoundation.org> References: <20210719144944.537151528@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");