HID: fix lock imbalance in hiddev
Don't forget to unlock_kernel() in hiddev_ioctl_usage().
Added in 7961df1681
(HID: Switch hiddev to unlocked_ioctl).
Corresponing sparse warning:
drivers/hid/usbhid/hiddev.c:515:10: warning: context imbalance in 'hiddev_ioctl_usage': wrong count at exit
drivers/hid/usbhid/hiddev.c:515:10: context 'kernel_lock': wanted 0, got 1
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
0f2c5945a9
commit
eb9910894d
|
@ -436,8 +436,7 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
|
||||||
if (copy_to_user(user_arg, uref, sizeof(*uref)))
|
if (copy_to_user(user_arg, uref, sizeof(*uref)))
|
||||||
goto fault;
|
goto fault;
|
||||||
|
|
||||||
kfree(uref_multi);
|
goto goodreturn;
|
||||||
return 0;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (cmd != HIDIOCGUSAGE &&
|
if (cmd != HIDIOCGUSAGE &&
|
||||||
|
|
Loading…
Reference in a new issue