aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/zero.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/zero.c')
-rw-r--r--drivers/usb/gadget/zero.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 51424f66a765..68e3d8f5da89 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -572,9 +572,10 @@ static void source_sink_complete (struct usb_ep *ep, struct usb_request *req)
572 switch (status) { 572 switch (status) {
573 573
574 case 0: /* normal completion? */ 574 case 0: /* normal completion? */
575 if (ep == dev->out_ep) 575 if (ep == dev->out_ep) {
576 check_read_data (dev, ep, req); 576 check_read_data (dev, ep, req);
577 else 577 memset (req->buf, 0x55, req->length);
578 } else
578 reinit_write_data (dev, ep, req); 579 reinit_write_data (dev, ep, req);
579 break; 580 break;
580 581
@@ -626,6 +627,8 @@ source_sink_start_ep (struct usb_ep *ep, gfp_t gfp_flags)
626 627
627 if (strcmp (ep->name, EP_IN_NAME) == 0) 628 if (strcmp (ep->name, EP_IN_NAME) == 0)
628 reinit_write_data (ep->driver_data, ep, req); 629 reinit_write_data (ep->driver_data, ep, req);
630 else
631 memset (req->buf, 0x55, req->length);
629 632
630 status = usb_ep_queue (ep, req, gfp_flags); 633 status = usb_ep_queue (ep, req, gfp_flags);
631 if (status) { 634 if (status) {