mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
x86, hpet: Fix bogus error check in hpet_assign_irq()
commit 0219896228 upstream.
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>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0bed849274
commit
47ec6adc95
@@ -497,7 +497,7 @@ static int hpet_assign_irq(struct hpet_dev *dev)
|
||||
{
|
||||
unsigned int irq;
|
||||
|
||||
irq = create_irq();
|
||||
irq = create_irq_nr(0, -1);
|
||||
if (!irq)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user