diff options
author | Gary S. Robertson <gary.robertson@linaro.org> | 2015-09-09 17:00:58 -0500 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2015-09-09 17:00:58 -0500 |
commit | b00df57e50e087151f4ca976ca2796ea105f68c1 (patch) | |
tree | 041e22fd6831e8231d7405a445607979d1387775 /drivers/hid/hid-cp2112.c | |
parent | 6f7cc80865bae836c963fe4d405fe27496024f6f (diff) | |
parent | b7be2a1de3f5c0827a4f8ccb6a18342d9d4dc446 (diff) |
Merge tag 'lsk-v4.1-15.08' of http://git.linaro.org/kernel/linux-linaro-stable into linux-linaro-lng-v4.1linux-lng-4.1.5-2015.09
LSK 15.08 v4.1
Diffstat (limited to 'drivers/hid/hid-cp2112.c')
-rw-r--r-- | drivers/hid/hid-cp2112.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index 3318de690e00..a2dbbbe0d8d7 100644 --- a/drivers/hid/hid-cp2112.c +++ b/drivers/hid/hid-cp2112.c @@ -356,6 +356,8 @@ static int cp2112_read(struct cp2112_device *dev, u8 *data, size_t size) struct cp2112_force_read_report report; int ret; + if (size > sizeof(dev->read_data)) + size = sizeof(dev->read_data); report.report = CP2112_DATA_READ_FORCE_SEND; report.length = cpu_to_be16(size); |