Skip to contentSkip to conversation

gpio: idt3243x: Fix signedness bug in probe

PATCH In review Dan Carpenter 2 participants 2 messages Jan 20, 2022

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

PATCH 1/1 gpio: idt3243x: Fix signedness bug in probe

The "parent_irq" variable needs to be signed for the error handling to work.

Fixes 30fee1d7462a ("gpio: idt3243x: Fix IRQ check in idt_gpio_probe")
---
 drivers/gpio/gpio-idt3243x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-idt3243x.c +1 -1
index 08493b05be2d..52b8b72ded77 100644
@@ -132,7 +132,7 @@ static int idt_gpio_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct gpio_irq_chip *girq;
 	struct idt_gpio_ctrl *ctrl;
-	unsigned int parent_irq;
+	int parent_irq;
 	int ngpios;
 	int ret;
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 24 lines · Dan Carpenter

The "parent_irq" variable needs to be signed for the error handling to work.

Fixes 30fee1d7462a ("gpio: idt3243x: Fix IRQ check in idt_gpio_probe")
---
 drivers/gpio/gpio-idt3243x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-idt3243x.c +1 -2
index 08493b05be2d..52b8b72ded77 100644
@@ -132,7 +132,7 @@ static int idt_gpio_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct gpio_irq_chip *girq;
        struct idt_gpio_ctrl *ctrl;
-       unsigned int parent_irq;
+       int parent_irq;
        int ngpios;
        int ret;
 
--
Quoted 2 lines

2.20.1

Hi Dan!

Fixes for this and the same issue in mpc8xxx have already been fixed by Yang Li.

Bart