提交 bafac298 编写于 作者: J Jiang Liu 提交者: Thomas Gleixner

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: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/558447AF.30703@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 f6b1464f
...@@ -578,7 +578,7 @@ static void hpet_msi_capability_lookup(unsigned int start_timer) ...@@ -578,7 +578,7 @@ static void hpet_msi_capability_lookup(unsigned int start_timer)
continue; continue;
irq = hpet_assign_irq(hpet_domain, hdev, hdev->num); irq = hpet_assign_irq(hpet_domain, hdev, hdev->num);
if (irq < 0) if (irq <= 0)
continue; continue;
sprintf(hdev->name, "hpet%d", i); sprintf(hdev->name, "hpet%d", i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册