From: Roel Kluin <12o3l@tiscali.nl> Date: Sat, 26 Jul 2008 02:44:41 +0000 (-0700) Subject: asic3: platform_get_irq() may return signed unnoticed X-Git-Tag: v2.6.27-rc1~202 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c491b2ffae3fad5e6e3cb2320b46bb8ea8729d49;p=linux-2.6 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 Acked-by: Samuel Ortiz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 3b870e7fb3..eabf0bfcca 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;