提交 02198962 编写于 作者: T Thomas Gleixner 提交者: H. Peter Anvin

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: NThomas 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: NH. Peter Anvin <hpa@linux.intel.com>
上级 1cf180c9
...@@ -506,7 +506,7 @@ static int hpet_assign_irq(struct hpet_dev *dev) ...@@ -506,7 +506,7 @@ static int hpet_assign_irq(struct hpet_dev *dev)
{ {
unsigned int irq; unsigned int irq;
irq = create_irq(); irq = create_irq_nr(0, -1);
if (!irq) if (!irq)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册