aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-10-24 18:33:53 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-10-28 13:33:48 -0400
commit4db1f47c29bd19e2069fb877620540db2a51a572 (patch)
treee065d2d74809cde4aead470707cb448f8f89e683 /drivers/input
parent60183a6e93ac62727161d1a94abd80e2d7d901d0 (diff)
Input: vsxxxaa - fix code dropping bytes from queue
I believe the intent of the code was to drop oldest bytes from the queue, not the latest if we drop one byte and both latest and some oldest of we are dropping more than one. Acked-by: Jan-Benedict Glaw <jbglaw@lug-owl.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/vsxxxaa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c
index 38298232124f..abd494411e69 100644
--- a/drivers/input/mouse/vsxxxaa.c
+++ b/drivers/input/mouse/vsxxxaa.c
@@ -128,7 +128,7 @@ static void vsxxxaa_drop_bytes(struct vsxxxaa *mouse, int num)
128 if (num >= mouse->count) { 128 if (num >= mouse->count) {
129 mouse->count = 0; 129 mouse->count = 0;
130 } else { 130 } else {
131 memmove(mouse->buf, mouse->buf + num - 1, BUFLEN - num); 131 memmove(mouse->buf, mouse->buf + num, BUFLEN - num);
132 mouse->count -= num; 132 mouse->count -= num;
133 } 133 }
134} 134}