[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <480FBA51.8020403@tiscali.nl>
Date: Thu, 24 Apr 2008 00:38:09 +0200
From: Roel Kluin <12o3l@...cali.nl>
To: pb@...dhelds.org, sameo@...nedhand.com,
lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] asic3: platform_get_irq() may return signed unnoticed
asic->irq_nr is unsigned. platform_get_irq() may return signed unnoticed
Signed-off-by: Roel Kluin <12o3l@...cali.nl>
---
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index f6f2d96..8068c06 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -300,10 +300,13 @@ static int asic3_irq_probe(struct platform_device *pdev)
struct asic3 *asic = platform_get_drvdata(pdev);
unsigned long clksel = 0;
unsigned int irq, irq_base;
+ int ret;
- asic->irq_nr = platform_get_irq(pdev, 0);
- if (asic->irq_nr < 0)
+ ret = platform_get_irq(pdev, 0);
+ if (ret < 0)
return asic->irq_nr;
+ else
+ asic->irq_nr = ret;
/* turn on clock to IRQ controller */
clksel |= CLOCK_SEL_CX;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists