Skip to content

Commit

Permalink
genirq: do not execute DEBUG_SHIRQ when irq setup failed
Browse files Browse the repository at this point in the history
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@sapo.pt>
LKML-Reference: <20090401170635.GA4392@hades.domain.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[ fixed bug pointed out by a warning reported by Stephen Rothwell ]
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Luis Henriques authored and Ingo Molnar committed Apr 23, 2009
1 parent 833bb30 commit 6ce51c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ int request_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....
Expand Down

0 comments on commit 6ce51c4

Please sign in to comment.