Skip to content

Commit

Permalink
irqchip/qcom: Fix u32 comparison with value less than zero
Browse files Browse the repository at this point in the history
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: f20cc9b ("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]
  • Loading branch information
Colin Ian King authored and KAGA-KOKO committed Nov 23, 2017
1 parent 0e54705 commit e9990d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/irqchip/qcom-irq-combiner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e9990d7

Please sign in to comment.