diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-05 16:48:24 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-05 16:48:24 (GMT) |
commit | 5d329e245f9a1edb905284730650a0c6c806fb2e (patch) | |
tree | e65443cca9879cb7feab51cf88ad123c85d7737e /drivers/hid/hid-input.c | |
parent | a5939eefdcacd3ece57d56167a43bcc0d93733bf (diff) | |
parent | 883e0e366209067e690356e58e19bb2e6693b839 (diff) | |
download | linux-fsl-qoriq-5d329e245f9a1edb905284730650a0c6c806fb2e.tar.xz |
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull from Jiri Kosina:
"Please pull to receive updates for HID layer. Nikolai's patch is
rather important and should still go in for 3.3, as it's a regression
fix for commit b4b583d."
* 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: hid-input: allow array fields out of range
HID: usbhid: Add NOGET quirk for the AIREN Slim+ keyboard
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 9333d69..627850a 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -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; } |