diff options
Diffstat (limited to 'drivers/usb/gadget/atmel_usba_udc.c')
-rw-r--r-- | drivers/usb/gadget/atmel_usba_udc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 40d23384b716..2cb52e0438df 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -1772,7 +1772,7 @@ out: | |||
1772 | static int atmel_usba_start(struct usb_gadget *gadget, | 1772 | static int atmel_usba_start(struct usb_gadget *gadget, |
1773 | struct usb_gadget_driver *driver) | 1773 | struct usb_gadget_driver *driver) |
1774 | { | 1774 | { |
1775 | int ret = 0; | 1775 | int ret; |
1776 | struct usba_udc *udc = container_of(gadget, struct usba_udc, gadget); | 1776 | struct usba_udc *udc = container_of(gadget, struct usba_udc, gadget); |
1777 | unsigned long flags; | 1777 | unsigned long flags; |
1778 | 1778 | ||
@@ -1784,11 +1784,11 @@ static int atmel_usba_start(struct usb_gadget *gadget, | |||
1784 | 1784 | ||
1785 | ret = clk_prepare_enable(udc->pclk); | 1785 | ret = clk_prepare_enable(udc->pclk); |
1786 | if (ret) | 1786 | if (ret) |
1787 | goto out; | 1787 | return ret; |
1788 | ret = clk_prepare_enable(udc->hclk); | 1788 | ret = clk_prepare_enable(udc->hclk); |
1789 | if (ret) { | 1789 | if (ret) { |
1790 | clk_disable_unprepare(udc->pclk); | 1790 | clk_disable_unprepare(udc->pclk); |
1791 | goto out; | 1791 | return ret; |
1792 | } | 1792 | } |
1793 | 1793 | ||
1794 | DBG(DBG_GADGET, "registered driver `%s'\n", driver->driver.name); | 1794 | DBG(DBG_GADGET, "registered driver `%s'\n", driver->driver.name); |
@@ -1804,11 +1804,9 @@ static int atmel_usba_start(struct usb_gadget *gadget, | |||
1804 | usba_writel(udc, CTRL, USBA_ENABLE_MASK); | 1804 | usba_writel(udc, CTRL, USBA_ENABLE_MASK); |
1805 | usba_writel(udc, INT_ENB, USBA_END_OF_RESET); | 1805 | usba_writel(udc, INT_ENB, USBA_END_OF_RESET); |
1806 | } | 1806 | } |
1807 | |||
1808 | out: | ||
1809 | spin_unlock_irqrestore(&udc->lock, flags); | 1807 | spin_unlock_irqrestore(&udc->lock, flags); |
1810 | 1808 | ||
1811 | return ret; | 1809 | return 0; |
1812 | } | 1810 | } |
1813 | 1811 | ||
1814 | static int atmel_usba_stop(struct usb_gadget *gadget, | 1812 | static int atmel_usba_stop(struct usb_gadget *gadget, |