Mtp: fix mtp sync operation no response,hold in error stat.

fix bug: while read buffer length > MTP_BULK_BUFFER_SIZE, return -1
errno=EINVAL(22)
This commit is contained in:
liuji
2011-12-12 09:42:45 +08:00
committed by liuji
parent ba73f493d0
commit bb2322bfa9

View File

@@ -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");