Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173764
b: refs/heads/master
c: eb8141c
h: refs/heads/master
v: v3
  • Loading branch information
Lamarque Vieira Souza authored and Jiri Kosina committed Oct 13, 2009
1 parent 4d6447e commit 77651d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c857730438cceb56a94ade3029899f52adf3b90
refs/heads/master: eb8141ccd32d422fa11c6e2108cae4c40456d811
1 change: 1 addition & 0 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,7 @@ static const struct hid_device_id hid_ignore_list[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY) },
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/hid/usbhid/hiddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL);
if (!uref_multi)
return -ENOMEM;
lock_kernel();
uref = &uref_multi->uref;
if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) {
if (copy_from_user(uref_multi, user_arg,
Expand Down Expand Up @@ -527,6 +528,7 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,

case HIDIOCGCOLLECTIONINDEX:
i = field->usage[uref->usage_index].collection_index;
unlock_kernel();
kfree(uref_multi);
return i;
case HIDIOCGUSAGES:
Expand All @@ -545,12 +547,15 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
}

goodreturn:
unlock_kernel();
kfree(uref_multi);
return 0;
fault:
unlock_kernel();
kfree(uref_multi);
return -EFAULT;
inval:
unlock_kernel();
kfree(uref_multi);
return -EINVAL;
}
Expand Down

0 comments on commit 77651d6

Please sign in to comment.