Commit 4859484b authored by Jiri Slaby's avatar Jiri Slaby Committed by Jiri Kosina

HID: hiddev, fix lock imbalance

Add omitted BKL to one switch/case.

Cc: Stable <stable@kernel.org>
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 45e3e193
......@@ -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] =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment