Merge commit 'v2.6.37-rc2' into sched/core
[~shefty/rdma-dev.git] / kernel / irq / manage.c
index 850f030fa0c23de862a9c5923de9f1a8daf24364..91a5fa25054e1d14d62339749f3229fae49f3766 100644 (file)
@@ -324,6 +324,10 @@ void enable_irq(unsigned int irq)
        if (!desc)
                return;
 
+       if (WARN(!desc->irq_data.chip || !desc->irq_data.chip->irq_enable,
+           KERN_ERR "enable_irq before setup/request_irq: irq %u\n", irq))
+               return;
+
        chip_bus_lock(desc);
        raw_spin_lock_irqsave(&desc->lock, flags);
        __enable_irq(desc, irq, false);