Skip to content

Commit 0219896

Browse files
KAGA-KOKOH. Peter Anvin
authored andcommitted
x86, hpet: Fix bogus error check in hpet_assign_irq()
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>
1 parent 1cf180c commit 0219896

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/hpet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ static int hpet_assign_irq(struct hpet_dev *dev)
506506
{
507507
unsigned int irq;
508508

509-
irq = create_irq();
509+
irq = create_irq_nr(0, -1);
510510
if (!irq)
511511
return -EINVAL;
512512

0 commit comments

Comments
 (0)