Skip to contentSkip to conversation

gpio: msm: make msm_gpio.summary_irq signed for error handling

PATCH In review Dan Carpenter 2 participants 2 messages Nov 7, 2013 – Nov 18, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: msm: make msm_gpio.summary_irq signed for error handling

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')
drivers/gpio/gpio-msm-v2.c +1 -1
index f7a0cc4..7b37300 100644
@@ -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;
 };
 
#1 lore raw
Quoted 10 lines · Dan Carpenter

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')

Applied for fixes and tagged for stable.

Yours,
Linus Walleij