mfd: pm8921: Fixup probe() error path when irq invalid
authorJosh Cartwright <joshc@codeaurora.org>
Wed, 5 Mar 2014 19:34:25 +0000 (13:34 -0600)
committerLee Jones <lee.jones@linaro.org>
Wed, 19 Mar 2014 08:58:39 +0000 (08:58 +0000)
platform_get_irq() returns a negative error code when an IRQ is invalid
or unspecified.  Make 'irq' signed to properly handle this.

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/pm8921-core.c

index 1153e8a3a556e677e2f9040bf5b73c6daec821d2..b97a97187ae992ebe9f1b55cb511636b012fde4c 100644 (file)
@@ -394,9 +394,8 @@ static int pm8921_probe(struct platform_device *pdev)
 {
        struct pm8921 *pmic;
        struct regmap *regmap;
-       int rc;
+       int irq, rc;
        unsigned int val;
-       unsigned int irq;
        u32 rev;
        struct pm_irq_chip *chip;
        unsigned int nirqs = PM8921_NR_IRQS;