HID: hiddev, fix lock imbalance
authorJiri Slaby <jirislaby@gmail.com>
Fri, 19 Jun 2009 21:24:11 +0000 (23:24 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 22 Jun 2009 09:01:06 +0000 (11:01 +0200)
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>
drivers/hid/usbhid/hiddev.c

index e9b436d2d94434c17fb1030d50528341edd71659..39e27f4be4acbfb7e27731053271fcd33c7d93d1 100644 (file)
@@ -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] =