summaryrefslogtreecommitdiffstats
path: root/include/linux/irqnr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irqnr.h')
-rw-r--r--include/linux/irqnr.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index c4a59c7a478..5504a5c9783 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -22,10 +22,14 @@ extern struct irq_desc *irq_to_desc(unsigned int irq);
# define for_each_irq_desc(irq, desc) \
for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
- irq++, desc = irq_to_desc(irq))
+ irq++, desc = irq_to_desc(irq)) \
+ if (desc)
+
+
# define for_each_irq_desc_reverse(irq, desc) \
for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \
- irq--, desc = irq_to_desc(irq))
+ irq--, desc = irq_to_desc(irq)) \
+ if (desc)
#endif /* CONFIG_GENERIC_HARDIRQS */