gpio: mpc8xxx: Prevent NULL pointer deref in demux handler
[pandora-kernel.git] / drivers / gpio / gpio-mpc8xxx.c
index 5cd04b6..edcffd6 100644 (file)
@@ -163,7 +163,8 @@ static void mpc8xxx_gpio_irq_cascade(unsigned int irq, struct irq_desc *desc)
        if (mask)
                generic_handle_irq(irq_linear_revmap(mpc8xxx_gc->irq,
                                                     32 - ffs(mask)));
-       chip->irq_eoi(&desc->irq_data);
+       if (chip->irq_eoi)
+               chip->irq_eoi(&desc->irq_data);
 }
 
 static void mpc8xxx_irq_unmask(struct irq_data *d)