diff options
-rw-r--r-- | drivers/xen/events.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 4d4a23d4c9f6..3df7e477694a 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -170,6 +170,9 @@ static struct irq_info *info_for_irq(unsigned irq) | |||
170 | 170 | ||
171 | static unsigned int evtchn_from_irq(unsigned irq) | 171 | static unsigned int evtchn_from_irq(unsigned irq) |
172 | { | 172 | { |
173 | if (unlikely(WARN(irq < 0 || irq >= nr_irqs, "Invalid irq %d!\n", irq))) | ||
174 | return 0; | ||
175 | |||
173 | return info_for_irq(irq)->evtchn; | 176 | return info_for_irq(irq)->evtchn; |
174 | } | 177 | } |
175 | 178 | ||