aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/hid-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 7452399501b..aeeb6798e2f 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -880,7 +880,7 @@ static void hid_output_field(struct hid_field *field, __u8 *data)
/* make sure the unused bits in the last byte are zeros */
if (count > 0 && size > 0)
- data[(count*size-1)/8] = 0;
+ data[(offset+count*size-1)/8] = 0;
for (n = 0; n < count; n++) {
if (field->logical_minimum < 0) /* signed values */