瀏覽代碼

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>
Andres Salomon 16 年之前
父節點
當前提交
5fb17fd9a2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/input/mouse/hgpk.c

+ 1 - 1
drivers/input/mouse/hgpk.c

@@ -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)