|
@@ -1043,6 +1043,8 @@ ep0_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
|
|
|
// FIXME don't call this with the spinlock held ...
|
|
// FIXME don't call this with the spinlock held ...
|
|
|
if (copy_to_user (buf, dev->req->buf, len))
|
|
if (copy_to_user (buf, dev->req->buf, len))
|
|
|
retval = -EFAULT;
|
|
retval = -EFAULT;
|
|
|
|
|
+ else
|
|
|
|
|
+ retval = len;
|
|
|
clean_req (dev->gadget->ep0, dev->req);
|
|
clean_req (dev->gadget->ep0, dev->req);
|
|
|
/* NOTE userspace can't yet choose to stall */
|
|
/* NOTE userspace can't yet choose to stall */
|
|
|
}
|
|
}
|