diff options
Diffstat (limited to 'drivers/hid/usbhid/hiddev.c')
-rw-r--r-- | drivers/hid/usbhid/hiddev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 9e9421525fb9..215b2addddbb 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c | |||
@@ -527,8 +527,10 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, | |||
527 | goto goodreturn; | 527 | goto goodreturn; |
528 | 528 | ||
529 | case HIDIOCGCOLLECTIONINDEX: | 529 | case HIDIOCGCOLLECTIONINDEX: |
530 | i = field->usage[uref->usage_index].collection_index; | ||
531 | unlock_kernel(); | ||
530 | kfree(uref_multi); | 532 | kfree(uref_multi); |
531 | return field->usage[uref->usage_index].collection_index; | 533 | return i; |
532 | case HIDIOCGUSAGES: | 534 | case HIDIOCGUSAGES: |
533 | for (i = 0; i < uref_multi->num_values; i++) | 535 | for (i = 0; i < uref_multi->num_values; i++) |
534 | uref_multi->values[i] = | 536 | uref_multi->values[i] = |