Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288172
b: refs/heads/master
c: 883e0e3
h: refs/heads/master
v: v3
  • Loading branch information
Nikolai Kondrashov authored and Jiri Kosina committed Mar 5, 2012
1 parent dde53c0 commit 42c2353
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37891abc8464637964a26ae4b61d307fef831f80
refs/heads/master: 883e0e366209067e690356e58e19bb2e6693b839
9 changes: 7 additions & 2 deletions trunk/drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,13 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
return;
}

/* Ignore out-of-range values as per HID specification, section 5.10 */
if (value < field->logical_minimum || value > field->logical_maximum) {
/*
* Ignore out-of-range values as per HID specification,
* section 5.10 and 6.2.25
*/
if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
(value < field->logical_minimum ||
value > field->logical_maximum)) {
dbg_hid("Ignoring out-of-range value %x\n", value);
return;
}
Expand Down

0 comments on commit 42c2353

Please sign in to comment.