linux-mips
[Top] [All Lists]

[PATCH] [MIPS] vr41xx: unsigned irq cannot be negative

To: ralf@linux-mips.org, yoichi_yuasa@tripeaks.co.jp, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [MIPS] vr41xx: unsigned irq cannot be negative
From: roel kluin <roel.kluin@gmail.com>
Date: Mon, 15 Sep 2008 20:50:54 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=lKsFSykpp82vOAJ9rPrK9JRi/tkubwna8AwYR7Wp9PI=; b=fFSrp7LO0qMGC8Sxe9cSKzSNebeDkHhKTC4ew3+PIrRAUMj+95xrJInTRinDodyGNr NrBrugtSWJ6wttz1FY02SNugJ2LGFE7Jv0UCLQuKRml3+ciQ5gPtaLmK2jnZ4g6YBbst 4uJjWQ6fFutetWudbyNkoFo21zaDUYzqukqBo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=dR5hjdimv55hbMBiOug4D0t8yM9sV//90N+6nOG7t0tuQxN0ISr9bDTC3wE2eaH86l 3nlUNX6+sTrOiaPM6AuEiHnXAqPYYFmf4Gk2Zth9AWo/KoMAzZsYSy/L9oRijE0uyqAo +hrhYz8DYtRNGPJKS3SegV5eiIkx6SAu+kDD8=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110)
unsigned irq cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c
index cba36a2..92dd1a0 100644
--- a/arch/mips/vr41xx/common/irq.c
+++ b/arch/mips/vr41xx/common/irq.c
@@ -72,6 +72,7 @@ static void irq_dispatch(unsigned int irq)
        cascade = irq_cascade + irq;
        if (cascade->get_irq != NULL) {
                unsigned int source_irq = irq;
+               int ret;
                desc = irq_desc + source_irq;
                if (desc->chip->mask_ack)
                        desc->chip->mask_ack(source_irq);
@@ -79,8 +80,9 @@ static void irq_dispatch(unsigned int irq)
                        desc->chip->mask(source_irq);
                        desc->chip->ack(source_irq);
                }
-               irq = cascade->get_irq(irq);
-               if (irq < 0)
+               ret = cascade->get_irq(irq);
+               irq = ret;
+               if (ret < 0)
                        atomic_inc(&irq_err_count);
                else
                        irq_dispatch(irq);

<Prev in Thread] Current Thread [Next in Thread>