diff options
author | Zhen Lei <thunder.leizhen@huawei.com> | 2021-05-13 21:26:46 +0800 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-06-01 17:06:41 +0200 |
commit | 7fea67710e9f6a111a2c9440576f2396ccd92d57 (patch) | |
tree | 8a35e0f8c283258426b0e7eb972352ffa0f48ee7 /drivers/firmware/tegra | |
parent | 6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff) | |
download | linux-stable-7fea67710e9f6a111a2c9440576f2396ccd92d57.tar.gz linux-stable-7fea67710e9f6a111a2c9440576f2396ccd92d57.tar.bz2 linux-stable-7fea67710e9f6a111a2c9440576f2396ccd92d57.zip |
firmware: tegra: Fix error return code in tegra210_bpmp_init()
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 <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/firmware/tegra')
-rw-r--r-- | drivers/firmware/tegra/bpmp-tegra210.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |