Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit cfe919b5 authored by Chuansheng Liu's avatar Chuansheng Liu Committed by Felipe Balbi
Browse files

usb: gadget: return the right length in ffs_epfile_io()



When the request length is aligned to maxpacketsize, sometimes
the return length ret > the user space requested len.

At that time, we will use min_t(size_t, ret, len) to limit the
size in case of user data buffer overflow.

But we need return the min_t(size_t, ret, len) to tell the user
space rightly also.

[ balbi@ti.com: also fix comment's indentation ]

Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Reviewed-by: default avatarDavid Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: default avatarChuansheng Liu <chuansheng.liu@intel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 8bebbe8d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment