Skip to content

Commit

Permalink
x86, hpet: Fix bogus error check in hpet_assign_irq()
Browse files Browse the repository at this point in the history
create_irq() returns -1 if the interrupt allocation failed, but the
code checks for irq == 0.

Use create_irq_nr() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Venkatesh Pallipadi <venki@google.com>
LKML-Reference: <alpine.LFD.2.00.1009282310360.2416@localhost6.localdomain6>
Cc: stable@kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Thomas Gleixner authored and H. Peter Anvin committed Sep 30, 2010
1 parent 1cf180c commit 0219896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ static int hpet_assign_irq(struct hpet_dev *dev)
{
unsigned int irq;

irq = create_irq();
irq = create_irq_nr(0, -1);
if (!irq)
return -EINVAL;

Expand Down

0 comments on commit 0219896

Please sign in to comment.