aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/musb/musb_gadget.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index b3773f13ee0a..d6a802c224fa 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1710,17 +1710,15 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
1710 1710
1711 spin_unlock_irqrestore(&musb->lock, flags); 1711 spin_unlock_irqrestore(&musb->lock, flags);
1712 1712
1713 if (retval == 0) 1713 if (retval == 0) {
1714 retval = driver->bind(&musb->g); 1714 retval = driver->bind(&musb->g);
1715 if (retval != 0) { 1715 if (retval != 0) {
1716 DBG(3, "bind to driver %s failed --> %d\n", 1716 DBG(3, "bind to driver %s failed --> %d\n",
1717 driver->driver.name, retval); 1717 driver->driver.name, retval);
1718 musb->gadget_driver = NULL; 1718 musb->gadget_driver = NULL;
1719 musb->g.dev.driver = NULL; 1719 musb->g.dev.driver = NULL;
1720 } 1720 }
1721 1721
1722 /* start peripheral and/or OTG engines */
1723 if (retval == 0) {
1724 spin_lock_irqsave(&musb->lock, flags); 1722 spin_lock_irqsave(&musb->lock, flags);
1725 1723
1726 /* REVISIT always use otg_set_peripheral(), handling 1724 /* REVISIT always use otg_set_peripheral(), handling