All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] firmware: tegra: Fix error return code in tegra210_bpmp_init()
@ 2021-05-13 13:26 Zhen Lei
  2021-06-01 15:07 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2021-05-13 13:26 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Timo Alho, linux-tegra; +Cc: 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")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/firmware/tegra/bpmp-tegra210.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/tegra/bpmp-tegra210.c b/drivers/firmware/tegra/bpmp-tegra210.c
index ae15940a078e3e5..c32754055c60bf4 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");
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] firmware: tegra: Fix error return code in tegra210_bpmp_init()
  2021-05-13 13:26 [PATCH 1/1] firmware: tegra: Fix error return code in tegra210_bpmp_init() Zhen Lei
@ 2021-06-01 15:07 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2021-06-01 15:07 UTC (permalink / raw)
  To: Zhen Lei; +Cc: Jonathan Hunter, Timo Alho, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

On Thu, May 13, 2021 at 09:26:46PM +0800, Zhen Lei wrote:
> 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>
> ---
>  drivers/firmware/tegra/bpmp-tegra210.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-01 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 13:26 [PATCH 1/1] firmware: tegra: Fix error return code in tegra210_bpmp_init() Zhen Lei
2021-06-01 15:07 ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.