summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <yousaf.kaukab@intel.com>2015-01-09 12:38:45 (GMT)
committerFelipe Balbi <balbi@ti.com>2015-01-12 21:32:49 (GMT)
commitc139ec27f9c77c7c215d7989f6d77e2dbaba63df (patch)
treefb91509d4d47c8b391dc715b46035d53aa016b5f /drivers/usb
parent3f95001db7998c350422708a437694dda07bc04e (diff)
downloadlinux-c139ec27f9c77c7c215d7989f6d77e2dbaba63df.tar.xz
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 <r.baldyga@samsung.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc2/gadget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 35d346f..a4d2c26 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 */