Commit cdcedd69 authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: gadget: don't prevent gadget from being probed if we fail

In case we fail our ->udc_start() callback, we
should be ready to accept another modprobe following
the failed one.

We had forgotten to clear dwc->gadget_driver back
to NULL and, because of that, we were preventing
gadget driver modprobe from being retried.

Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent ad81f054
...@@ -1584,6 +1584,7 @@ static int dwc3_gadget_start(struct usb_gadget *g, ...@@ -1584,6 +1584,7 @@ static int dwc3_gadget_start(struct usb_gadget *g,
__dwc3_gadget_ep_disable(dwc->eps[0]); __dwc3_gadget_ep_disable(dwc->eps[0]);
err0: err0:
dwc->gadget_driver = NULL;
spin_unlock_irqrestore(&dwc->lock, flags); spin_unlock_irqrestore(&dwc->lock, flags);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment