summaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci_imx.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2014-07-30 08:54:07 +0800
committerTejun Heo <tj@kernel.org>2014-07-30 12:04:22 -0400
commit19f5be0f40922717e2b6e39a9822e7e7f30fd81f (patch)
tree6814df902506c85c3e8edcd7a9b5544ddd6cb741 /drivers/ata/ahci_imx.c
parent0185b1b787962db38fdf74e1cab9b7a2619490a1 (diff)
downloadlinux-19f5be0f40922717e2b6e39a9822e7e7f30fd81f.tar.bz2
ahci: imx: add missing clk_disable_unprepare() on error in imx_sata_enable()
Add the missing clk_disable_unprepare() before return from imx_sata_enable() in the phy reset error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci_imx.c')
-rw-r--r--drivers/ata/ahci_imx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 685a4db030b1..e7be1f87d3e5 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -257,7 +257,7 @@ static int imx_sata_enable(struct ahci_host_priv *hpriv)
ret = imx_sata_phy_reset(hpriv);
if (ret) {
dev_err(dev, "failed to reset phy: %d\n", ret);
- goto disable_regulator;
+ goto disable_clk;
}
}
@@ -265,6 +265,8 @@ static int imx_sata_enable(struct ahci_host_priv *hpriv)
return 0;
+disable_clk:
+ clk_disable_unprepare(imxpriv->sata_ref_clk);
disable_regulator:
if (hpriv->target_pwr)
regulator_disable(hpriv->target_pwr);