From 35f8679f577ae5673a778598bcbe7b45cbec8923 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 7 Jan 2016 15:06:51 -0800 Subject: Input: omap-keypad - remove dead check Commit da1f026b532ce944d74461497dc6d8c16456466e ("Keyboard: omap-keypad: use matrix_keypad.h") switched the driver to use matrix keypad infrastructure, which made array of keycodes to be unsigned short, and caused the test for negativity never trigger. This leads to the following static checker warning: drivers/input/keyboard/omap-keypad.c:158 omap_kp_tasklet() warn: 'keycodes[]' is never negative. Given that we did not care about this check for a few years already let's simply remove it. Reported-by: Dan Carpenter Acked-by: Aaro Koskinen Acked-by: Tony Lindgren Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/omap-keypad.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers/input/keyboard/omap-keypad.c') diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index 75ad6661e130..e0d72c8c01e4 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -155,14 +155,6 @@ static void omap_kp_tasklet(unsigned long data) "pressed" : "released"); #else key = keycodes[MATRIX_SCAN_CODE(row, col, row_shift)]; - if (key < 0) { - printk(KERN_WARNING - "omap-keypad: Spurious key event %d-%d\n", - col, row); - /* We scan again after a couple of seconds */ - spurious = 1; - continue; - } if (!(kp_cur_group == (key & GROUP_MASK) || kp_cur_group == -1)) -- cgit v1.2.3