Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: mt6779-keypad - fix signedness bug

The irq variable is defined as unsigned int. If the platform_get_irq()
returns a negative value, data type cast may result in error.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi (CGEL ZTE) <lv.ruyi@zte.com.cn>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20220308025054.2077162-1-lv.ruyi@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Lv Ruyi (CGEL ZTE) and committed by
Dmitry Torokhov
5fb3fb8a f28af984

+1 -1
+1 -1
drivers/input/keyboard/mt6779-keypad.c
··· 91 91 static int mt6779_keypad_pdrv_probe(struct platform_device *pdev) 92 92 { 93 93 struct mt6779_keypad *keypad; 94 - unsigned int irq; 94 + int irq; 95 95 u32 debounce; 96 96 bool wakeup; 97 97 int error;