aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiang Liu <[email protected]>2015-06-20 11:50:50 +0200
committerThomas Gleixner <[email protected]>2015-06-20 12:00:58 +0200
commitbafac298fb20e9ae1305c710d4fd8d20c5911afa (patch)
treed77c6c28975e3c673162563b921ad75f50360b74
parentf6b1464f647424bbeb609ec832428e4079940701 (diff)
x86/hpet: Check for irq==0 when allocating hpet MSI interrupts
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 <[email protected]> Cc: Borislav Petkov <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
-rw-r--r--arch/x86/kernel/hpet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index e2449cf38b06..c47aab35a17e 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -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);