|
@@ -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)
|
|
|
|
- return 0;
|
|
|
|
|
|
+ if (!hid->name) {
|
|
|
|
+ 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,
|
|
|
|
|
|
if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) {
|
|
if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) {
|
|
int len;
|
|
int len;
|
|
- if (!hid->phys)
|
|
|
|
- return 0;
|
|
|
|
|
|
+ if (!hid->phys) {
|
|
|
|
+ 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);
|