]> err.no Git - linux-2.6/commitdiff
gadgetfs patch for ep0out
authorSkip Hansen <s-hansen@cox.net>
Fri, 1 Sep 2006 22:26:27 +0000 (15:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 27 Sep 2006 18:58:56 +0000 (11:58 -0700)
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>
drivers/usb/gadget/inode.c

index a38b6af2c3580d4038f631534631a57ca23fc782..4655522a08d95b10dfa227e267d3d144d3b9b694 100644 (file)
@@ -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 */