diff options
author | Michael Zaidman <michael.zaidman@gmail.com> | 2021-05-11 13:12:08 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-05-27 15:40:34 +0200 |
commit | 82f09a637dd3215bce5314664f0171cdc3e43bb5 (patch) | |
tree | a56768dc27c6007d05318433152e9362a40b8386 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 4fb125192563670e820991de48f8db495ecc7ff7 (diff) |
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: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions