Skip to content

Commit

Permalink
Input: psmouse - fix incorrect validate_byte check in OLPC protocol
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andres Salomon authored and Dmitry Torokhov committed Nov 11, 2008
1 parent d6d79a7 commit 5fb17fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/mouse/hgpk.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static void hgpk_spewing_hack(struct psmouse *psmouse,
*/
static int hgpk_validate_byte(unsigned char *packet)
{
return (packet[0] & 0x0C) == 0x08;
return (packet[0] & 0x0C) != 0x08;
}

static void hgpk_process_packet(struct psmouse *psmouse)
Expand Down

0 comments on commit 5fb17fd

Please sign in to comment.