From: Thomas Gleixner Date: Tue, 28 Sep 2010 21:20:23 +0000 (+0200) Subject: x86, hpet: Fix bogus error check in hpet_assign_irq() X-Git-Tag: Ubuntu-5.0.0-8.9~21460^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=021989622810b02aab4b24f91e1f5ada2b654579;p=mirror_ubuntu-disco-kernel.git 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: Thomas Gleixner Cc: Venkatesh Pallipadi LKML-Reference: Cc: stable@kernel.org Signed-off-by: H. Peter Anvin --- diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 410fdb3f1939..7494999141b3 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -506,7 +506,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;