From: Dmitry Torokhov Date: Mon, 13 Feb 2017 23:45:59 +0000 (-0800) Subject: Input: tca8418_keypad - remove double read of key event register X-Git-Tag: v4.1.51~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d60591c4ecb4881b0ed8207b1c300086e6d070b7;p=thirdparty%2Fkernel%2Fstable.git Input: tca8418_keypad - remove double read of key event register [ Upstream commit 9dd46c02532a6bed6240101ecf4bbc407f8c6adf ] There is no need to tread the same register twice in a row. Fixes: ea4348c8462a ("Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-un ...") Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 5c4f7f8f2c20c..05c3f25dd8c29 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c @@ -189,8 +189,6 @@ static void tca8418_read_keypad(struct tca8418_keypad *keypad_data) input_event(input, EV_MSC, MSC_SCAN, code); input_report_key(input, keymap[code], state); - /* Read for next loop */ - error = tca8418_read_byte(keypad_data, REG_KEY_EVENT_A, ®); } while (1); input_sync(input);