projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba73f49
)
Mtp: fix mtp sync operation no response,hold in error stat.
author
liuji
<liuji@liuji@rock-chips.com>
Mon, 12 Dec 2011 01:42:45 +0000
(09:42 +0800)
committer
liuji
<liuji@rock-chips.com>
Mon, 12 Dec 2011 08:46:31 +0000
(16:46 +0800)
fix bug: while read buffer length > MTP_BULK_BUFFER_SIZE, return -1
errno=EINVAL(22)
drivers/usb/gadget/f_mtp.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_mtp.c
b/drivers/usb/gadget/f_mtp.c
index d1c259e3eb2dd087bfe752ba75bb8108717f73ee..fce4346bb5462315103002387078669f9746f725 100644
(file)
--- a/
drivers/usb/gadget/f_mtp.c
+++ b/
drivers/usb/gadget/f_mtp.c
@@
-470,7
+470,7
@@
static ssize_t mtp_read(struct file *fp, char __user *buf,
DBG(cdev, "mtp_read(%d)\n", count);
if (count > MTP_BULK_BUFFER_SIZE)
-
return -EINVAL
;
+
count = MTP_BULK_BUFFER_SIZE
;
/* we will block until we're online */
DBG(cdev, "mtp_read: waiting for online state\n");