[041/103] x86, hpet: Fix bogus error check in hpet_assign_irq()

From: Greg KH
Date: Fri Oct 22 2010 - 15:16:24 EST


2.6.35-stable review patch. If anyone has any objections, please let us know.

------------------

From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
Cc: Venkatesh Pallipadi <venki@xxxxxxxxxx>
LKML-Reference: <alpine.LFD.2.00.1009282310360.2416@xxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
arch/x86/kernel/hpet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -507,7 +507,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;



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/