]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86, hpet: Fix bogus error check in hpet_assign_irq()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 28 Sep 2010 21:20:23 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:43:15 +0000 (12:43 -0700)
commit 021989622810b02aab4b24f91e1f5ada2b654579 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>
arch/x86/kernel/hpet.c

index 241c5b24b349220374d2ecd7ebd6ff5d4a985b43..9ae9b0b25795d6c6b7c2a64d13dee6b68b50152e 100644 (file)
@@ -498,7 +498,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;