提交 38089c65 编写于 作者: D Dan Carpenter 提交者: Jiri Kosina

HID: hidraw -- fix missing unlocks in unlocked_ioctl

There were 2 places that returned directly instead of releasing their
locks.  I sent a fix for this file earlier but ended up missing these
spots.  I think what happened is that I have improved my checker script
since then...  Or maybe I just screwed up.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 0221c81b
...@@ -285,8 +285,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, ...@@ -285,8 +285,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) { if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) {
int len; int len;
if (!hid->name) if (!hid->name) {
return 0; ret = 0;
break;
}
len = strlen(hid->name) + 1; len = strlen(hid->name) + 1;
if (len > _IOC_SIZE(cmd)) if (len > _IOC_SIZE(cmd))
len = _IOC_SIZE(cmd); len = _IOC_SIZE(cmd);
...@@ -297,8 +299,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, ...@@ -297,8 +299,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) { if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) {
int len; int len;
if (!hid->phys) if (!hid->phys) {
return 0; ret = 0;
break;
}
len = strlen(hid->phys) + 1; len = strlen(hid->phys) + 1;
if (len > _IOC_SIZE(cmd)) if (len > _IOC_SIZE(cmd))
len = _IOC_SIZE(cmd); len = _IOC_SIZE(cmd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册