[PATCH v2] asic3: platform_get_irq() may return signed unnoticed

Roel Kluin
2008-04-23T22:38:22Z

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;