diff options
author | Peter Chen <peter.chen@freescale.com> | 2013-03-22 13:46:23 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2013-03-22 13:58:40 +0800 |
commit | 0b4471f4173cd1e34475443f11b7c22d82e6fa79 (patch) | |
tree | b3dadfda409c102c6e177ab448cb670afc69b1fd /arch | |
parent | e4b10a85a7693ecfd973cb421e2a45ca631ceacc (diff) |
ENGR00255484-3 msl: usb: add clock deinit at fail path
If not, the clocks usage will be mismatch
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx6/usb_dr.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx6/usb_h1.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/usb_dr.c b/arch/arm/mach-mx6/usb_dr.c index 7c8ef2f16447..8fb850397c10 100644 --- a/arch/arm/mach-mx6/usb_dr.c +++ b/arch/arm/mach-mx6/usb_dr.c @@ -144,6 +144,10 @@ static int usbotg_init_ext(struct platform_device *pdev) ret = usbotg_init(pdev); if (ret) { + clk_disable(usb_oh3_clk); + clk_put(usb_oh3_clk); + clk_disable(usb_phy1_clk); + clk_put(usb_phy1_clk); printk(KERN_ERR "otg init fails......\n"); return ret; } diff --git a/arch/arm/mach-mx6/usb_h1.c b/arch/arm/mach-mx6/usb_h1.c index d983e2870045..d4b7001a111c 100644 --- a/arch/arm/mach-mx6/usb_h1.c +++ b/arch/arm/mach-mx6/usb_h1.c @@ -148,6 +148,8 @@ static int fsl_usb_host_init_ext(struct platform_device *pdev) ret = fsl_usb_host_init(pdev); if (ret) { printk(KERN_ERR "host1 init fails......\n"); + clk_disable(usb_oh3_clk); + clk_put(usb_oh3_clk); return ret; } usbh1_internal_phy_clock_gate(true); |