Skip to content

Commit

Permalink
firmware: tegra: Fix error return code in tegra210_bpmp_init()
Browse files Browse the repository at this point in the history
[ Upstream commit 7fea677 ]

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: 139251f ("firmware: tegra: add bpmp driver for Tegra210")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhen Lei authored and gregkh committed Jul 20, 2021
1 parent 212f260 commit d50892c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firmware/tegra/bpmp-tegra210.c
Expand Up @@ -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");
Expand Down

0 comments on commit d50892c

Please sign in to comment.