summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLv Ruyi (CGEL ZTE) <lv.ruyi@zte.com.cn>2022-03-14 18:12:21 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-03-14 18:14:51 -0700
commit5fb3fb8aa22ff6e6da4018fd3ab3e30e2fdc5e53 (patch)
treebd6903893c0388938f94d9e9a88a571b0a6d5005 /drivers
parentf28af984e771efd1ded81b865b50fa13b69bcde5 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/keyboard/mt6779-keypad.c2
1 files changed, 1 insertions, 1 deletions
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;