diff options
author | Binyamin Sharet <[email protected]> | 2016-07-07 22:22:04 +0300 |
---|---|---|
committer | Felipe Balbi <[email protected]> | 2016-08-11 15:09:46 +0300 |
commit | 63196e989699ddffb4e3d30ca8c3567d408820f4 (patch) | |
tree | 38e89f838dbf362ebad3ead74e292c5aecc2980c /lib/mpi/mpi-bit.c | |
parent | 528d28138f91009f230903bd89ccd44719667831 (diff) |
usb: gadget: fix check in sync read from ep in gadgetfs
When reading synchronously from a non-zero endpoint, gadgetfs will
return -EFAULT even if the read succeeds, due to a bad check of the
copy_to_iter() return value.
This fix compares the return value of copy_to_iter to the amount of
bytes that was passed, and only fails if they are not the same.
Signed-off-by: Binyamin Sharet <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions