Commit 021989622810b02aab4b24f91e1f5ada2b654579

Authored by Thomas Gleixner
Committed by H. Peter Anvin
1 parent 1cf180c94e

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

arch/x86/kernel/hpet.c
... ... @@ -506,7 +506,7 @@
506 506 {
507 507 unsigned int irq;
508 508  
509   - irq = create_irq();
  509 + irq = create_irq_nr(0, -1);
510 510 if (!irq)
511 511 return -EINVAL;
512 512