From: Jiri Slaby Date: Fri, 19 Jun 2009 21:24:11 +0000 (+0200) Subject: HID: hiddev, fix lock imbalance X-Git-Tag: MMI-PSA29.97-13-9~27357^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4859484b0957ddc7fe3e0fa349d98b0f1c7876bd;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git HID: hiddev, fix lock imbalance Add omitted BKL to one switch/case. Cc: Stable Signed-off-by: Jiri Slaby Signed-off-by: Jiri Kosina --- 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] =