diff options
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 7b5856fadd93..eee87098bb8b 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c | |||
@@ -2561,8 +2561,10 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, | |||
2561 | hs_ep->fifo_size = val; | 2561 | hs_ep->fifo_size = val; |
2562 | break; | 2562 | break; |
2563 | } | 2563 | } |
2564 | if (i == 8) | 2564 | if (i == 8) { |
2565 | return -ENOMEM; | 2565 | ret = -ENOMEM; |
2566 | goto error; | ||
2567 | } | ||
2566 | } | 2568 | } |
2567 | 2569 | ||
2568 | /* for non control endpoints, set PID to D0 */ | 2570 | /* for non control endpoints, set PID to D0 */ |
@@ -2579,6 +2581,7 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, | |||
2579 | /* enable the endpoint interrupt */ | 2581 | /* enable the endpoint interrupt */ |
2580 | s3c_hsotg_ctrl_epint(hsotg, index, dir_in, 1); | 2582 | s3c_hsotg_ctrl_epint(hsotg, index, dir_in, 1); |
2581 | 2583 | ||
2584 | error: | ||
2582 | spin_unlock_irqrestore(&hsotg->lock, flags); | 2585 | spin_unlock_irqrestore(&hsotg->lock, flags); |
2583 | return ret; | 2586 | return ret; |
2584 | } | 2587 | } |
@@ -2934,9 +2937,7 @@ static int s3c_hsotg_udc_stop(struct usb_gadget *gadget, | |||
2934 | 2937 | ||
2935 | spin_lock_irqsave(&hsotg->lock, flags); | 2938 | spin_lock_irqsave(&hsotg->lock, flags); |
2936 | 2939 | ||
2937 | if (!driver) | 2940 | hsotg->driver = NULL; |
2938 | hsotg->driver = NULL; | ||
2939 | |||
2940 | hsotg->gadget.speed = USB_SPEED_UNKNOWN; | 2941 | hsotg->gadget.speed = USB_SPEED_UNKNOWN; |
2941 | 2942 | ||
2942 | spin_unlock_irqrestore(&hsotg->lock, flags); | 2943 | spin_unlock_irqrestore(&hsotg->lock, flags); |
@@ -3567,6 +3568,7 @@ static int s3c_hsotg_probe(struct platform_device *pdev) | |||
3567 | s3c_hsotg_initep(hsotg, &hsotg->eps[epnum], epnum); | 3568 | s3c_hsotg_initep(hsotg, &hsotg->eps[epnum], epnum); |
3568 | 3569 | ||
3569 | /* disable power and clock */ | 3570 | /* disable power and clock */ |
3571 | s3c_hsotg_phy_disable(hsotg); | ||
3570 | 3572 | ||
3571 | ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies), | 3573 | ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies), |
3572 | hsotg->supplies); | 3574 | hsotg->supplies); |
@@ -3575,8 +3577,6 @@ static int s3c_hsotg_probe(struct platform_device *pdev) | |||
3575 | goto err_ep_mem; | 3577 | goto err_ep_mem; |
3576 | } | 3578 | } |
3577 | 3579 | ||
3578 | s3c_hsotg_phy_disable(hsotg); | ||
3579 | |||
3580 | ret = usb_add_gadget_udc(&pdev->dev, &hsotg->gadget); | 3580 | ret = usb_add_gadget_udc(&pdev->dev, &hsotg->gadget); |
3581 | if (ret) | 3581 | if (ret) |
3582 | goto err_ep_mem; | 3582 | goto err_ep_mem; |