HID: fix lock imbalance in hidraw
authorJiri Slaby <jirislaby@gmail.com>
Wed, 22 Oct 2008 23:47:30 +0000 (01:47 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 22 Oct 2008 23:47:30 +0000 (01:47 +0200)
Add omitted unlock_kernel() to hidraw_ioctl().
Added in 979c407e3b89b606e810fa494ef316896eadbfad
(HID: Push down BKL into ioctl handler in hidraw).

Corresponing sparse warning:
drivers/hid/hidraw.c:267:9: warning: context imbalance in 'hidraw_ioctl': wrong count at exit
drivers/hid/hidraw.c:267:9:    context 'kernel_lock': wanted 0, got 1

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hidraw.c

index 1c23813995aa73d249c1c9bb30fc337ba314fbf7..894d52e05bf9cd995586250011e8401227bd043a 100644 (file)
@@ -264,6 +264,7 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
                default:
                        ret = -ENOTTY;
        }
+       unlock_kernel();
        return ret;
 }