Minor fixes, do not count interrupts without interrupt source as spurious (#1755)
[openwrt/staging/florian.git] / target / linux / adm5120-2.6 / files / arch / mips / adm5120 / irq.c
index 46f3bb05ee4a344bd5a2071e5eb41f05debb8c47..c53272e1e0968c8cb4f853764a46f758f7760353 100644 (file)
@@ -48,11 +48,12 @@ void adm5120_hw0_irqdispatch(struct pt_regs *regs)
 
        intsrc = ADM5120_INTC_STATUS & ADM5120_IRQ_MASK;
 
-       for (i = 0; intsrc; intsrc >>= 1, i++)
-               if (intsrc & 0x1)
-                       do_IRQ(i);
-               else
-                       spurious_interrupt();
+       if (intsrc) {
+               for (i = 0; intsrc; intsrc >>= 1, i++)
+                       if (intsrc & 0x1)
+                               do_IRQ(i);
+       } else
+               spurious_interrupt();
 }
 
 void mips_timer_interrupt(struct pt_regs *regs)