Skip to content

Commit

Permalink
[POWERPC] Make irq_dispose_mapping(NO_IRQ) a nop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Oct 25, 2006
1 parent a0f4672 commit 5414c6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5414c6b

Please sign in to comment.