summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_hid.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-05-16 17:51:56 +0000
committermav <mav@FreeBSD.org>2012-05-16 17:51:56 +0000
commit3135fa1ca0fbfec6b2f6dfc4fe0ebddf4b44c8b7 (patch)
tree9c23c98b74eb3979609cc1d2450f6bae78ada75c /sys/dev/usb/usb_hid.c
parentb227d4379e3f747272635a63519b7b82bc3ddbf8 (diff)
downloadFreeBSD-src-3135fa1ca0fbfec6b2f6dfc4fe0ebddf4b44c8b7.zip
FreeBSD-src-3135fa1ca0fbfec6b2f6dfc4fe0ebddf4b44c8b7.tar.gz
HID Report ID is unsigned value, so clear the rest of bits from possible
sign expansion.
Diffstat (limited to 'sys/dev/usb/usb_hid.c')
-rw-r--r--sys/dev/usb/usb_hid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_hid.c b/sys/dev/usb/usb_hid.c
index 165919b..6552546 100644
--- a/sys/dev/usb/usb_hid.c
+++ b/sys/dev/usb/usb_hid.c
@@ -425,7 +425,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
s->loc_size = dval & mask;
break;
case 8:
- hid_switch_rid(s, c, dval);
+ hid_switch_rid(s, c, dval & mask);
break;
case 9:
/* mask because value is unsigned */
OpenPOWER on IntegriCloud