diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-06-19 23:24:11 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-06-22 11:01:06 +0200 |
commit | 4859484b0957ddc7fe3e0fa349d98b0f1c7876bd (patch) | |
tree | fd76b7c83505330ccb424d9902d7da1756bba40a /drivers/hid | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (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')
-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 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, goto goodreturn; case HIDIOCGCOLLECTIONINDEX: + i = field->usage[uref->usage_index].collection_index; + unlock_kernel(); kfree(uref_multi); - return field->usage[uref->usage_index].collection_index; + return i; case HIDIOCGUSAGES: for (i = 0; i < uref_multi->num_values; i++) uref_multi->values[i] = |