UDC: Correct cleaning out memory for string descriptors
BUG=chrome-os-partner:41687 BRANCH=None TEST=Compiles successfully and fastboot devices reports correct serial number even after re-connection. Change-Id: I4741a5d6333523eb47c27b4a20c4ef3f1e853d76 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 6249b1e35391550d788f56a7b3e7a49ae19f0c93 Original-Change-Id: I1348c33f354d11e3c29ccd9da9948cfbeb60aa9e Original-Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/281192 Original-Trybot-Ready: Furquan Shaikh <furquan@chromium.org> Original-Tested-by: Furquan Shaikh <furquan@chromium.org> Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/10687 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
ed1a4bbb60
commit
a4b718cc2d
|
@ -350,7 +350,7 @@ static int setup_ep0(struct usbdev_ctrl *this, dev_req_t *dr)
|
|||
int d_len = s_len * 2;
|
||||
|
||||
uint8_t *data = dma_malloc(d_len + 2);
|
||||
memset(data, 0, d_len);
|
||||
memset(data, 0, d_len + 2);
|
||||
data[0] = d_len + 2; // length
|
||||
data[1] = 0x03; // string descriptor
|
||||
int i;
|
||||
|
|
Loading…
Reference in New Issue