Skip to content
Commit 82f09a63 authored by Michael Zaidman's avatar Michael Zaidman Committed by Jiri Kosina
Browse files

HID: ft260: improve error handling of ft260_hid_feature_report_get()



The ft260_hid_feature_report_get() checks if the return size matches the
requested size. But the function can also fail with at least -ENOMEM.  Add the
< 0 checks.

In ft260_hid_feature_report_get(), do not do the memcpy to the caller's buffer
if there is an error.

Fixes: 6a82582d ("HID: ft260: add usb hid to i2c host bridge driver")
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarMichael Zaidman <michael.zaidman@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 4fb12519
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment