Skip to contentSkip to conversation

firmware: tegra: Fix error return code in tegra210_bpmp_init()

PATCH Applied Zhen Lei 2 participants 2 messages May 13, 2021 – Jun 1, 2021 Tegra architecture support

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/firmware/tegra/bpmp-tegra210.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/tegra/bpmp-tegra210.c +1 -1
index ae15940a078e3e5..c32754055c60bf4 100644
@@ -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");
Signature · 1 line
2.26.0.106.g9fadedd
#1 lore raw
Quoted 10 lines · Zhen Lei

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")
---
 drivers/firmware/tegra/bpmp-tegra210.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry