From: Michael Ellerman Date: Tue, 24 Oct 2006 03:37:34 +0000 (+1000) Subject: [POWERPC] Make irq_dispose_mapping(NO_IRQ) a nop X-Git-Tag: MMI-PSA29.97-13-9~44978^2~47^2~109^2~181 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5414c6be57dd02e089c3eba1f5134f441733d013;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [POWERPC] Make irq_dispose_mapping(NO_IRQ) a nop 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 Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 67b21a008f6e..eb9fc621e057 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -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;