Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zhen Lei and committed by
Thierry Reding
7fea6771 6efb943b

+1 -1
+1 -1
drivers/firmware/tegra/bpmp-tegra210.c
··· 210 210 priv->tx_irq_data = irq_get_irq_data(err); 211 211 if (!priv->tx_irq_data) { 212 212 dev_err(&pdev->dev, "failed to get IRQ data for TX IRQ\n"); 213 - return err; 213 + return -ENOENT; 214 214 } 215 215 216 216 err = platform_get_irq_byname(pdev, "rx");