From: Chuansheng Liu Date: Tue, 4 Mar 2014 07:34:57 +0000 (+0800) Subject: usb: gadget: return the right length in ffs_epfile_io() X-Git-Tag: v3.15-rc1~137^2~25^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfe919b53b807ab32e89e1c662c6d242948449bd;p=pandora-kernel.git 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: Michal Nazarewicz Reviewed-by: David Cohen Signed-off-by: Chuansheng Liu Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed