From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: [patch 02/47] x86: Hpet: Fix bogus error check in hpet_assign_irq() Date: Thu, 30 Sep 2010 23:14:40 -0000 Message-ID: <20100930221738.674120334@linutronix.de> References: <20100930221351.682772535@linutronix.de> Return-path: Content-Disposition: inline; filename=x86-hpet-fix-bogus-error-check-in-hpet_assign_irq.patch Sender: linux-kernel-owner@vger.kernel.org To: LKML Cc: linux-arch@vger.kernel.org, Linus Torvalds , Andrew Morton , x86@kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Paul Mundt , Russell King , David Woodhouse , Jesse Barnes , Yinghai Lu , Grant Likely , "Eric W. Biederman" , Venkatesh Pallipadi , stable@kernel.org List-Id: linux-arch.vger.kernel.org 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 --- arch/x86/kernel/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6-tip/arch/x86/kernel/hpet.c =================================================================== --- linux-2.6-tip.orig/arch/x86/kernel/hpet.c +++ linux-2.6-tip/arch/x86/kernel/hpet.c @@ -506,7 +506,7 @@ static int hpet_assign_irq(struct hpet_d { unsigned int irq; - irq = create_irq(); + irq = create_irq_nr(0, -1); if (!irq) return -EINVAL; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from www.tglx.de ([62.245.132.106]:34740 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752250Ab0I3XZP (ORCPT ); Thu, 30 Sep 2010 19:25:15 -0400 Message-ID: <20100930221738.674120334@linutronix.de> Date: Thu, 30 Sep 2010 23:14:40 -0000 From: Thomas Gleixner Subject: [patch 02/47] x86: Hpet: Fix bogus error check in hpet_assign_irq() References: <20100930221351.682772535@linutronix.de> Content-Disposition: inline; filename=x86-hpet-fix-bogus-error-check-in-hpet_assign_irq.patch Sender: linux-arch-owner@vger.kernel.org List-ID: To: LKML Cc: linux-arch@vger.kernel.org, Linus Torvalds , Andrew Morton , x86@kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Paul Mundt , Russell King , David Woodhouse , Jesse Barnes , Yinghai Lu , Grant Likely , "Eric W. Biederman" , Venkatesh Pallipadi , stable@kernel.org Message-ID: <20100930231440.7_C6ES9QYDRTB53UuSh1LcpK_ZsGp0UsV7u0Ff4lVxc@z> 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 --- arch/x86/kernel/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6-tip/arch/x86/kernel/hpet.c =================================================================== --- linux-2.6-tip.orig/arch/x86/kernel/hpet.c +++ linux-2.6-tip/arch/x86/kernel/hpet.c @@ -506,7 +506,7 @@ static int hpet_assign_irq(struct hpet_d { unsigned int irq; - irq = create_irq(); + irq = create_irq_nr(0, -1); if (!irq) return -EINVAL;