Make irq_dispose_mapping(NO_IRQ) a nop
PATCH 1/1 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 <[email protected]>
---
arch/powerpc/kernel/irq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/powerpc/kernel/irq.c +5 -1
@@ -626,10 +626,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 ;
Quoted 4 lines · Michael Ellerman
It makes for a friendlier API if
irq_dispose_mapping(NO_IRQ)is a nop, rather than triggering aWARN_ON.Signed-off-by Michael Ellerman <[email protected]>
Quoted 25 lines
---
arch/powerpc/kernel/irq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Index:
git/arch/powerpc/kernel/irq.c
===================================================================arch/powerpc/kernel/irq.c +5
-1@@ -626,10 +626,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 ;