mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irqchip/qcom: fix u32 comparison with value less than zero
@ 2017-11-17 18:35 Colin King
  2017-11-23 19:09 ` [tip:irq/urgent] irqchip/qcom: Fix " tip-bot for Colin Ian King
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-11-17 18:35 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The comparison of u32 nregs being less than zero is never true since
nregs is unsigned. Fix this by making nregs a signed integer.

Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/irqchip/qcom-irq-combiner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
index 6aa3ea479214..f31265937439 100644
--- a/drivers/irqchip/qcom-irq-combiner.c
+++ b/drivers/irqchip/qcom-irq-combiner.c
@@ -238,7 +238,7 @@ static int __init combiner_probe(struct platform_device *pdev)
 {
 	struct combiner *combiner;
 	size_t alloc_sz;
-	u32 nregs;
+	int nregs;
 	int err;
 
 	nregs = count_registers(pdev);
-- 
2.14.1

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

end of thread, other threads:[~2017-11-23 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-17 18:35 [PATCH] irqchip/qcom: fix u32 comparison with value less than zero Colin King
2017-11-23 19:09 ` [tip:irq/urgent] irqchip/qcom: Fix " tip-bot for Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome