[04/12] USB: chipidea: clear gadget struct at udc_start fail path
diff mbox

Message ID 1342076512-19207-5-git-send-email-richard.zhao@freescale.com
State New, archived
Headers show

Commit Message

Richard Zhao July 12, 2012, 7:01 a.m. UTC
States in gadget are not needed any more, set it to zero.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
 drivers/usb/chipidea/udc.c |    1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 9029985..fd27f4d 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1759,6 +1759,7 @@  free_pools:
 	dma_pool_destroy(ci->td_pool);
 free_qh_pool:
 	dma_pool_destroy(ci->qh_pool);
+	memset(&ci->gadget, 0, sizeof(ci->gadget));
 	return retval;
 }