Michael Zaidman 82f09a637d 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>
2021-05-27 15:40:34 +02:00
..
2021-04-27 10:16:46 -07:00
2021-04-27 13:42:11 -07:00
2021-04-28 17:22:10 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 16:21:16 -07:00
2021-04-18 09:36:56 +03:00
2021-04-28 14:39:37 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 12:11:52 -07:00
2021-04-11 19:32:06 -06:00
2021-04-28 15:54:57 -07:00
2021-04-26 12:11:52 -07:00
2021-04-28 15:59:13 -07:00
2021-04-30 12:48:14 -07:00
2021-04-26 12:11:52 -07:00
2021-04-28 15:59:13 -07:00
2021-04-30 12:44:02 -07:00
2021-04-27 18:09:44 -07:00
2021-04-26 15:03:23 -07:00
2021-04-30 12:22:28 -07:00
2021-04-08 19:18:07 +02:00
2021-04-26 16:32:11 -07:00
2021-04-29 11:57:23 -07:00
2021-04-28 15:59:13 -07:00
2021-04-29 11:28:08 -07:00
2021-04-28 14:39:37 -07:00
2021-04-28 10:01:40 -07:00
2021-04-28 15:59:13 -07:00
2021-04-27 10:16:46 -07:00
2021-04-28 15:56:51 -07:00
2021-04-27 18:09:44 -07:00
2021-04-29 11:57:23 -07:00
2021-04-13 14:50:57 -07:00
2021-04-28 14:39:37 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 12:11:52 -07:00
2021-04-28 15:59:13 -07:00
2021-04-28 15:59:13 -07:00
2021-04-30 12:48:14 -07:00
2021-04-28 15:59:13 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 12:11:52 -07:00
2021-04-30 12:48:14 -07:00
2021-04-28 17:22:10 -07:00
2021-04-26 12:11:52 -07:00
2021-04-26 15:10:25 -07:00
2021-04-28 17:22:10 -07:00
2021-04-28 17:19:47 -07:00
2021-04-28 17:22:10 -07:00
2021-04-30 12:44:02 -07:00
2021-04-28 15:59:13 -07:00
2021-04-28 17:22:10 -07:00