Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: psmouse - fix incorrect validate_byte check in OLPC protocol

The validate_byte check logic was backwards; it should return true for
an *invalid* packet. Thanks to Jeremy Katz for spotting this one.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Andres Salomon and committed by
Dmitry Torokhov
5fb17fd9 d6d79a78

+1 -1
+1 -1
drivers/input/mouse/hgpk.c
··· 125 125 */ 126 126 static int hgpk_validate_byte(unsigned char *packet) 127 127 { 128 - return (packet[0] & 0x0C) == 0x08; 128 + return (packet[0] & 0x0C) != 0x08; 129 129 } 130 130 131 131 static void hgpk_process_packet(struct psmouse *psmouse)