projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60183a6
)
Input: vsxxxaa - fix code dropping bytes from queue
author
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Fri, 24 Oct 2014 22:33:53 +0000
(15:33 -0700)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Tue, 28 Oct 2014 17:33:48 +0000
(10:33 -0700)
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>
drivers/input/mouse/vsxxxaa.c
patch
|
blob
|
history
diff --git
a/drivers/input/mouse/vsxxxaa.c
b/drivers/input/mouse/vsxxxaa.c
index
3829823
..
abd4944
100644
(file)
--- 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)
if (num >= mouse->count) {
mouse->count = 0;
} else {
- memmove(mouse->buf, mouse->buf + num
- 1
, BUFLEN - num);
+ memmove(mouse->buf, mouse->buf + num, BUFLEN - num);
mouse->count -= num;
}
}