We only have 14 GPIO interrupt sources numbered from 0 to 13. Therefore the check against irq_nr in rb532_set_type is off-by-one. This fixes a mistake introduced by commit 1b4f571632ffb0caa4170d886694f2555c0d9a4b. Signed-off-by: Florian Fainelli <florian@xxxxxxxxxxx> --- diff --git a/arch/mips/rb532/irq.c b/arch/mips/rb532/irq.c index 8ac4372..f078820 100644 --- a/arch/mips/rb532/irq.c +++ b/arch/mips/rb532/irq.c @@ -175,7 +175,7 @@ static int rb532_set_type(unsigned int irq_nr, unsigned type) int gpio = irq_nr - GPIO_MAPPED_IRQ_BASE; int group = irq_to_group(irq_nr); - if (group != GPIO_MAPPED_IRQ_GROUP || irq_nr >= (GROUP4_IRQ_BASE + 13)) + if (group != GPIO_MAPPED_IRQ_GROUP || irq_nr > (GROUP4_IRQ_BASE + 13)) return (type == IRQ_TYPE_LEVEL_HIGH) ? 0 : -EINVAL; switch (type) {