aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/hiddev.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-06-19 17:24:11 -0400
committerJiri Kosina <jkosina@suse.cz>2009-06-22 05:01:06 -0400
commit4859484b0957ddc7fe3e0fa349d98b0f1c7876bd (patch)
treefd76b7c83505330ccb424d9902d7da1756bba40a /drivers/hid/usbhid/hiddev.c
parent45e3e1935e2857c54783291107d33323b3ef33c8 (diff)
HID: hiddev, fix lock imbalance
Add omitted BKL to one switch/case. Cc: Stable <stable@kernel.org> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/hiddev.c')
-rw-r--r--drivers/hid/usbhid/hiddev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index e9b436d2d944..39e27f4be4ac 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] =