Skip to content

Commit

Permalink
x86/hpet: Check for irq==0 when allocating hpet MSI interrupts
Browse files Browse the repository at this point in the history
irq == 0 is not a valid irq for a irqdomain MSI allocation, but hpet
code checks only for negative return values.

Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/558447AF.30703@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Jiang Liu authored and Thomas Gleixner committed Jun 20, 2015
1 parent f6b1464 commit bafac29
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 @@ -578,7 +578,7 @@ static void hpet_msi_capability_lookup(unsigned int start_timer)
continue;

irq = hpet_assign_irq(hpet_domain, hdev, hdev->num);
if (irq < 0)
if (irq <= 0)
continue;

sprintf(hdev->name, "hpet%d", i);
Expand Down

0 comments on commit bafac29

Please sign in to comment.