aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hidraw.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-02 16:29:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-02 16:29:47 -0700
commit020f932bd246e9d595f7a006250762d98ffeab46 (patch)
treeb2ab5dc5bea498368148664d226820bac9ab24f2 /drivers/hid/hidraw.c
parentMerge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev (diff)
parentHID: fix oops in hid_check_keys_pressed() (diff)
downloadlinux-dev-020f932bd246e9d595f7a006250762d98ffeab46.tar.xz
linux-dev-020f932bd246e9d595f7a006250762d98ffeab46.zip
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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index e263d4731179..00ccf4b1985d 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);