[RESEND][PATCH -tip] irq: DEBUG_SHIRQ executed on irq setup failure

From: Luis Henriques
Date: Wed Apr 01 2009 - 13:09:35 EST


When requesting an IRQ, the DEBUG_SHIRQ code executes a fake IRQ just to make
sure the driver is ready to receive an IRQ immediately. The problem was that
this fake IRQ was being executed even if interrupt line failed to be allocated
by __setup_irq.

Signed-off-by: Luis Henriques <henrix@xxxxxxx>
---
kernel/irq/manage.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index a3eb7ba..39a0f4d 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -914,7 +914,7 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
kfree(action);

#ifdef CONFIG_DEBUG_SHIRQ
- if (irqflags & IRQF_SHARED) {
+ if (!retval & (irqflags & IRQF_SHARED)) {
/*
* It's a shared IRQ -- the driver ought to be prepared for it
* to happen immediately, so let's make sure....
--
1.6.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/