summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/inode.c
diff options
context:
space:
mode:
authorSkip Hansen <s-hansen@cox.net>2006-09-01 15:26:27 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 11:58:56 -0700
commit997694defd085f4dd168c6e7e0e82382c5be9db4 (patch)
treea78d8f960bf1e01286ed48b55a8273a2d672b49e /drivers/usb/gadget/inode.c
parent53bd6a601a87bb6d0df844872bc15fd4e8d127ce (diff)
downloadlwn-997694defd085f4dd168c6e7e0e82382c5be9db4.tar.gz
lwn-997694defd085f4dd168c6e7e0e82382c5be9db4.zip
gadgetfs patch for ep0out
For ep0out transfers (rare), be sure to copy the right data to userspace. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/inode.c')
-rw-r--r--drivers/usb/gadget/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index a38b6af2c358..4655522a08d9 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -1015,7 +1015,7 @@ ep0_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
else {
len = min (len, (size_t)dev->req->actual);
// 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;
clean_req (dev->gadget->ep0, dev->req);
/* NOTE userspace can't yet choose to stall */