Thread (2 messages) 2 messages, 2 authors, 2022-03-09

[PATCH] input: fix variable type

flat view
STALE1676d LANDED

From: <hidden>
Date: 2022-03-08 02:51:06
Also in: linux-arm-kernel, linux-mediatek, lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, mediatek keypad driver, the rest · Maintainers: Dmitry Torokhov, Mattijs Korpershoek, Linus Torvalds

Landed in mainline as 5fb3fb8aa22f on 2022-03-15.

From: Lv Ruyi (CGEL ZTE) <redacted>

The irq is defined unsigned int. If the platform_get_irq return a negative
value, data type cast may result in error.

Reported-by: Zeal Robot <redacted>
Signed-off-by: Lv Ruyi (CGEL ZTE) <redacted>
---
 drivers/input/keyboard/mt6779-keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/mt6779-keypad.c b/drivers/input/keyboard/mt6779-keypad.c
index 5ff23250ed37..0dbbddc7f298 100644
--- a/drivers/input/keyboard/mt6779-keypad.c
+++ b/drivers/input/keyboard/mt6779-keypad.c
@@ -91,7 +91,7 @@ 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;
+	int irq;
 	u32 debounce;
 	bool wakeup;
 	int error;
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help