Skip to contentSkip to conversation

Input: mt6779-keypad - fix signedness bug in probe

PATCH In review Dan Carpenter 2 participants 2 messages Mar 14, 2022

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

PATCH 1/1 Input: mt6779-keypad - fix signedness bug in probe

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

Fixes f28af984e771 ("Input: mt6779-keypad - add MediaTek keypad driver")
---
 drivers/input/keyboard/mt6779-keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/mt6779-keypad.c +1 -1
index 5ff23250ed37..abd7e346203d 100644
@@ -91,10 +91,10 @@ static void mt6779_keypad_clk_disable(void *data)
 static int mt6779_keypad_pdrv_probe(struct platform_device *pdev)
 {
 	struct mt6779_keypad *keypad;
-	unsigned int irq;
 	u32 debounce;
 	bool wakeup;
 	int error;
+	int irq;
 
 	keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL);
 	if (!keypad)
Signature · 1 line
2.20.1
#1 lore raw

Hi Dan,

Quoted 4 lines · Dan Carpenter

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

Fixes f28af984e771 ("Input: mt6779-keypad - add MediaTek keypad driver")

Thank you for the patch.

This was already reported and fixed at [1]

[1] https://lore.kernel.org/linux-input/[email protected]/

Quoted 22 lines
---
 drivers/input/keyboard/mt6779-keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/mt6779-keypad.c +1 -1
index 5ff23250ed37..abd7e346203d 100644
@@ -91,10 +91,10 @@ static void mt6779_keypad_clk_disable(void *data)
 static int mt6779_keypad_pdrv_probe(struct platform_device *pdev)
 {
 	struct mt6779_keypad *keypad;
-	unsigned int irq;
 	u32 debounce;
 	bool wakeup;
 	int error;
+	int irq;
 
 	keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL);
 	if (!keypad)
Signature · 1 line
2.20.1