From: Lv Ruyi (CGEL ZTE) Date: Tue, 15 Mar 2022 01:12:21 +0000 (-0700) Subject: Input: mt6779-keypad - fix signedness bug X-Git-Tag: baikal/mips/sdk6.1~6069^2~1^2~13 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=393380bc9ac7e0f5bcb64a7b9abad25669d2b786;p=kernel.git 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 Signed-off-by: Lv Ruyi (CGEL ZTE) Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20220308025054.2077162-1-lv.ruyi@zte.com.cn Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/mt6779-keypad.c b/drivers/input/keyboard/mt6779-keypad.c index 5ff23250ed37d..0dbbddc7f2980 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;