[POWERPC] Make irq_dispose_mapping(NO_IRQ) a nop
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 24 Oct 2006 03:37:34 +0000 (13:37 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 25 Oct 2006 04:20:20 +0000 (14:20 +1000)
It makes for a friendlier API if irq_dispose_mapping(NO_IRQ) is a
nop, rather than triggering a WARN_ON.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/irq.c

index 67b21a008f6e3e71593c2145a54847869d57d5ff..eb9fc621e0576f52e9161ee5c2447753da373639 100644 (file)
@@ -648,10 +648,14 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
 
 void irq_dispose_mapping(unsigned int virq)
 {
-       struct irq_host *host = irq_map[virq].host;
+       struct irq_host *host;
        irq_hw_number_t hwirq;
        unsigned long flags;
 
+       if (virq == NO_IRQ)
+               return;
+
+       host = irq_map[virq].host;
        WARN_ON (host == NULL);
        if (host == NULL)
                return;