Patchwork [U-Boot,V5,14/18] usb: gadget: mv_udc: zero transfer descriptor memory on probe

login
register
mail settings
Submitter Troy Kisky
Date Sept. 26, 2013, 1:41 a.m.
Message ID <1380159678-26416-15-git-send-email-troy.kisky@boundarydevices.com>
Download mbox | patch
Permalink /patch/278058/
State Awaiting Upstream
Delegated to: Marek Vasut
Headers show

Comments

Troy Kisky - Sept. 26, 2013, 1:41 a.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>

---
v4: no change
v5: no change
---
 drivers/usb/gadget/mv_udc.c | 1 +
 1 file changed, 1 insertion(+)
Marek Vasut - Sept. 27, 2013, 6:01 p.m.
Dear Troy Kisky,

> Since we flush the TD, we may as well set it to a known value.
> 
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> 
Picking for -next, thanks

Best regards,
Marek Vasut

Patch

diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
index ff3f3b5..091c566 100644
--- a/drivers/usb/gadget/mv_udc.c
+++ b/drivers/usb/gadget/mv_udc.c
@@ -643,6 +643,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++) {
 		/*