Skip to content

Commit

Permalink
hvc_console: Call free_irq() only if request_irq() was successful
Browse files Browse the repository at this point in the history
Only call free_irq if we marked the request_irq has having succeeded
instead of whenever the the sub-driver identified the interrupt to use.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Milton Miller authored and Benjamin Herrenschmidt committed Jan 13, 2009
1 parent 9fef3d2 commit c21f7a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/hvc_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int notifier_add_irq(struct hvc_struct *hp, int irq)

void notifier_del_irq(struct hvc_struct *hp, int irq)
{
if (!irq)
if (!hp->irq_requested)
return;
free_irq(irq, hp);
hp->irq_requested = 0;
Expand Down

0 comments on commit c21f7a5

Please sign in to comment.