diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-02 16:29:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-02 16:29:47 -0700 |
commit | 020f932bd246e9d595f7a006250762d98ffeab46 (patch) | |
tree | b2ab5dc5bea498368148664d226820bac9ab24f2 /drivers/hid/hidraw.c | |
parent | 912e7796b06fa9b1006835605e27c42e46801b8f (diff) | |
parent | e5288eb5ea89bd82d897cb687348bc608278f920 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: fix oops in hid_check_keys_pressed()
HID: fix possible deadlock in usbhid_close()
HID: Fix the support for apple mini aluminium keyboard
HID: Add support for the G25 force feedback wheel in native mode
HID: hidraw -- fix missing unlocks in unlocked_ioctl
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r-- | drivers/hid/hidraw.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index e263d473117..00ccf4b1985 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -285,8 +285,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) { int len; - if (!hid->name) - return 0; + if (!hid->name) { + ret = 0; + break; + } len = strlen(hid->name) + 1; if (len > _IOC_SIZE(cmd)) len = _IOC_SIZE(cmd); @@ -297,8 +299,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) { int len; - if (!hid->phys) - return 0; + if (!hid->phys) { + ret = 0; + break; + } len = strlen(hid->phys) + 1; if (len > _IOC_SIZE(cmd)) len = _IOC_SIZE(cmd); |