aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-10-22 19:47:34 -0400
committerJiri Kosina <jkosina@suse.cz>2008-10-22 19:47:34 -0400
commiteb9910894d7857c273e049b297fd6251e5ecc43e (patch)
tree296ffbceed469ec42ae7107c1b9ce7356f05eeb0 /drivers/hid/usbhid
parent0f2c5945a917e776ccd394f0e1924e9502c2795f (diff)
HID: fix lock imbalance in hiddev
Don't forget to unlock_kernel() in hiddev_ioctl_usage(). Added in 7961df16819085b8a357720d89d0239036e6af2a (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>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hiddev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index babd65dd46ad..3ac320785fc5 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -436,8 +436,7 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
436 if (copy_to_user(user_arg, uref, sizeof(*uref))) 436 if (copy_to_user(user_arg, uref, sizeof(*uref)))
437 goto fault; 437 goto fault;
438 438
439 kfree(uref_multi); 439 goto goodreturn;
440 return 0;
441 440
442 default: 441 default:
443 if (cmd != HIDIOCGUSAGE && 442 if (cmd != HIDIOCGUSAGE &&