From c139ec27f9c77c7c215d7989f6d77e2dbaba63df Mon Sep 17 00:00:00 2001 From: Mian Yousaf Kaukab Date: Fri, 9 Jan 2015 13:38:45 +0100 Subject: [PATCH] usb: dwc2: gadget: fix error path in dwc2_gadget_init In the error path, s3c_hsotg_phy_disable should be called after a call to s3c_hsotg_phy_enable is made. Tested-by: Robert Baldyga Acked-by: Paul Zimmerman Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Felipe Balbi --- drivers/usb/dwc2/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 35d346fcd900..a4d2c2622597 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -3476,7 +3476,7 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq) if (ret) { dev_err(dev, "failed to enable supplies: %d\n", ret); - goto err_supplies; + goto err_clk; } /* usb phy enable */ @@ -3510,7 +3510,7 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq) regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies), hsotg->supplies); dev_err(dev, "cannot claim IRQ for gadget\n"); - goto err_clk; + goto err_supplies; } /* hsotg->num_of_eps holds number of EPs other than ep0 */ -- 2.11.4.GIT