gpio: msm: make msm_gpio.summary_irq signed for error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Nov 2013 07:51:34 +0000 (10:51 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 25 Nov 2013 08:03:12 +0000 (09:03 +0100)
There is a bug in msm_gpio_probe() where we do:

msm_gpio.summary_irq = platform_get_irq(pdev, 0);
if (msm_gpio.summary_irq < 0) {

The problem is that "msm_gpio.summary_irq" is unsigned so the error
handling doesn't work.  I've fixed it by making it signed.

Fixes: 43f68444bce7 ('gpio: msm: Add device tree and irqdomain support for gpio-msm-v2')

Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-msm-v2.c

index f7a0cc4da9502d12ef0aa602dfa249665e5a5c4a..7b37300973dbc15d1a424448d932867b4d10d06d 100644 (file)
@@ -102,7 +102,7 @@ struct msm_gpio_dev {
        DECLARE_BITMAP(wake_irqs, MAX_NR_GPIO);
        DECLARE_BITMAP(dual_edge_irqs, MAX_NR_GPIO);
        struct irq_domain *domain;
-       unsigned int summary_irq;
+       int summary_irq;
        void __iomem *msm_tlmm_base;
 };