Skip to content

Commit

Permalink
Input: omap-keypad - remove dead check
Browse files Browse the repository at this point in the history
Commit da1f026 ("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 <dan.carpenter@oracle.com>
Acked-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Dmitry Torokhov committed Jan 8, 2016
1 parent 3b7474e commit 35f8679
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/input/keyboard/omap-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 35f8679

Please sign in to comment.