usb: gadget: Clear usb_endpoint_descriptor inside the struct usb_ep on disable
This fix a bug in f_serial, which expect the ep->desc to be NULL after
disabling an endpoint.
Cc: stable@vger.kernel.org
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index d8dee22..15a8cdb 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -557,6 +557,7 @@
/* restore the endpoint's pristine config */
ep->desc = NULL;
+ ep->ep.desc = NULL;
ep->ep.maxpacket = ep->maxpacket;
/* reset fifos and endpoint */