Commit a8347954 authored by roel kluin's avatar roel kluin Committed by Ralf Baechle

[MIPS] VR41xx: unsigned irq cannot be negative

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent bc45eb89
...@@ -72,6 +72,7 @@ static void irq_dispatch(unsigned int irq) ...@@ -72,6 +72,7 @@ static void irq_dispatch(unsigned int irq)
cascade = irq_cascade + irq; cascade = irq_cascade + irq;
if (cascade->get_irq != NULL) { if (cascade->get_irq != NULL) {
unsigned int source_irq = irq; unsigned int source_irq = irq;
int ret;
desc = irq_desc + source_irq; desc = irq_desc + source_irq;
if (desc->chip->mask_ack) if (desc->chip->mask_ack)
desc->chip->mask_ack(source_irq); desc->chip->mask_ack(source_irq);
...@@ -79,8 +80,9 @@ static void irq_dispatch(unsigned int irq) ...@@ -79,8 +80,9 @@ static void irq_dispatch(unsigned int irq)
desc->chip->mask(source_irq); desc->chip->mask(source_irq);
desc->chip->ack(source_irq); desc->chip->ack(source_irq);
} }
irq = cascade->get_irq(irq); ret = cascade->get_irq(irq);
if (irq < 0) irq = ret;
if (ret < 0)
atomic_inc(&irq_err_count); atomic_inc(&irq_err_count);
else else
irq_dispatch(irq); irq_dispatch(irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment