summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoel Kluin <12o3l@tiscali.nl>2008-07-25 19:44:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 12:00:02 -0700
commitc491b2ffae3fad5e6e3cb2320b46bb8ea8729d49 (patch)
tree861f2496d74909de139d882f4b05884ea2cb1ecb
parentf3c6ba986ab4527b6dfacf9f3b9e40f72466a8b2 (diff)
downloadop-kernel-dev-c491b2ffae3fad5e6e3cb2320b46bb8ea8729d49.zip
op-kernel-dev-c491b2ffae3fad5e6e3cb2320b46bb8ea8729d49.tar.gz
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@tiscali.nl> Cc: Joe Perches <joe@perches.com> Acked-by: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/mfd/asic3.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 3b870e7..eabf0bf 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -314,10 +314,12 @@ static int __init asic3_irq_probe(struct platform_device *pdev)
unsigned long clksel = 0;
unsigned int irq, irq_base;
int map_size;
+ int ret;
- asic->irq_nr = platform_get_irq(pdev, 0);
- if (asic->irq_nr < 0)
- return asic->irq_nr;
+ ret = platform_get_irq(pdev, 0);
+ if (ret < 0)
+ return ret;
+ asic->irq_nr = ret;
/* turn on clock to IRQ controller */
clksel |= CLOCK_SEL_CX;
OpenPOWER on IntegriCloud