irqchip/qcom: Fix u32 comparison with value less than zero
authorColin Ian King <[email protected]>
Fri, 17 Nov 2017 18:35:53 +0000 (18:35 +0000)
committerThomas Gleixner <[email protected]>
Thu, 23 Nov 2017 19:03:58 +0000 (20:03 +0100)
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: [email protected]
Cc: Jason Cooper <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
drivers/irqchip/qcom-irq-combiner.c

index 6aa3ea4792148d057b9b5d766acd0a7dd5813979..f31265937439608314bf55d70665b55a299a4666 100644 (file)
@@ -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);