Patchwork [U-Boot,V3,19/20] usb: gadget: mv_udc: zero transfer descriptor memory on probe

login
register
mail settings
Submitter Troy Kisky
Date Aug. 1, 2013, 11:27 p.m.
Message ID <1375399657-25642-20-git-send-email-troy.kisky@boundarydevices.com>
Download mbox | patch
Permalink /patch/264168/
State Accepted
Delegated to: Marek Vasut
Headers show

Comments

Troy Kisky - Aug. 1, 2013, 11:27 p.m.
Since we flush the TD, we may as well set it to a known value.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 drivers/usb/gadget/mv_udc.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
index 82df9ab..4876894 100644
--- a/drivers/usb/gadget/mv_udc.c
+++ b/drivers/usb/gadget/mv_udc.c
@@ -661,6 +661,7 @@  static int mvudc_probe(void)
 		free(controller.epts);
 		return -ENOMEM;
 	}
+	memset(controller.items_mem, 0, ilist_sz);
 
 	for (i = 0; i < 2 * NUM_ENDPOINTS; i++) {
 		/*