]> git.hungrycats.org Git - linux/commitdiff
usb: dwc3: gadget: don't prevent gadget from being probed if we fail
authorFelipe Balbi <balbi@ti.com>
Mon, 15 Jul 2013 09:36:35 +0000 (12:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 08:25:50 +0000 (16:25 +0800)
commit cdcedd6981194e511cc206887db661d016069d68 upstream.

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.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c

index f62629b029fc38da2f9c9e7fc93e39ab3ba971c4..6d6fb88913c883e92a8b9b157f336b05e6881147 100644 (file)
@@ -1393,6 +1393,7 @@ err1:
        __dwc3_gadget_ep_disable(dwc->eps[0]);
 
 err0:
+       dwc->gadget_driver = NULL;
        spin_unlock_irqrestore(&dwc->lock, flags);
 
        return ret;