[<prev] [next>] [day] [month] [year] [list]
Message-Id: <4b30004af37521b2102a4eda7c15f7257437ac85.1511451256.git.arvind.yadav.cs@gmail.com>
Date: Thu, 23 Nov 2017 21:06:10 +0530
From: Arvind Yadav <arvind.yadav.cs@...il.com>
To: john@...ozen.org, ralf@...ux-mips.org
Cc: linux-kernel@...r.kernel.org, linux-mips@...ux-mips.org
Subject: [PATCH] MIPS: ralink: ix platform_get_irq's error checking
The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
arch/mips/ralink/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/ralink/timer.c b/arch/mips/ralink/timer.c
index d4469b2..913dc84b 100644
--- a/arch/mips/ralink/timer.c
+++ b/arch/mips/ralink/timer.c
@@ -109,7 +109,7 @@ static int rt_timer_probe(struct platform_device *pdev)
}
rt->irq = platform_get_irq(pdev, 0);
- if (!rt->irq) {
+ if (rt->irq < 0) {
dev_err(&pdev->dev, "failed to load irq\n");
return -ENOENT;
}
--
2.7.4
Powered by blists - more mailing lists