]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00255484-3 msl: usb: add clock deinit at fail path
authorPeter Chen <peter.chen@freescale.com>
Fri, 22 Mar 2013 05:46:23 +0000 (13:46 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:13:51 +0000 (14:13 +0200)
If not, the clocks usage will be mismatch

Signed-off-by: Peter Chen <peter.chen@freescale.com>
arch/arm/mach-mx6/usb_dr.c
arch/arm/mach-mx6/usb_h1.c

index 7c8ef2f16447d9f2633d40da497fd1cbd59c90e3..8fb850397c10dc9ab5acc953e319bc19d966617c 100644 (file)
@@ -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;
        }
index d983e2870045c0e27c85d12aba1a177e5d2de12d..d4b7001a111cbecdcde6d9f6d4fb3511bc1b2fde 100644 (file)
@@ -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);