diff options
| -rw-r--r-- | drivers/hid/hid-picolcd_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c index b48092d0e139..acbb021065ec 100644 --- a/drivers/hid/hid-picolcd_core.c +++ b/drivers/hid/hid-picolcd_core.c | |||
| @@ -290,7 +290,7 @@ static ssize_t picolcd_operation_mode_store(struct device *dev, | |||
| 290 | buf += 10; | 290 | buf += 10; |
| 291 | cnt -= 10; | 291 | cnt -= 10; |
| 292 | } | 292 | } |
| 293 | if (!report) | 293 | if (!report || report->maxfield != 1) |
| 294 | return -EINVAL; | 294 | return -EINVAL; |
| 295 | 295 | ||
| 296 | while (cnt > 0 && (buf[cnt-1] == '\n' || buf[cnt-1] == '\r')) | 296 | while (cnt > 0 && (buf[cnt-1] == '\n' || buf[cnt-1] == '\r')) |
