* [PATCH] ahci: imx: add missing clk_disable_unprepare() on error in imx_sata_enable()
@ 2014-07-30 0:54 weiyj_lk
2014-07-30 2:37 ` Shawn Guo
2014-07-30 16:06 ` Tejun Heo
0 siblings, 2 replies; 3+ messages in thread
From: weiyj_lk @ 2014-07-30 0:54 UTC (permalink / raw)
To: Tejun Heo, Grant Likely, Rob Herring, Shawn Guo; +Cc: Wei Yongjun, linux-ide
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
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>
---
drivers/ata/ahci_imx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index cac4360..7767325 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -265,7 +265,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;
}
}
@@ -273,6 +273,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);
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ahci: imx: add missing clk_disable_unprepare() on error in imx_sata_enable()
2014-07-30 0:54 [PATCH] ahci: imx: add missing clk_disable_unprepare() on error in imx_sata_enable() weiyj_lk
@ 2014-07-30 2:37 ` Shawn Guo
2014-07-30 16:06 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2014-07-30 2:37 UTC (permalink / raw)
To: weiyj_lk; +Cc: Tejun Heo, Grant Likely, Rob Herring, Wei Yongjun, linux-ide
On Wed, Jul 30, 2014 at 08:54:07AM +0800, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ahci: imx: add missing clk_disable_unprepare() on error in imx_sata_enable()
2014-07-30 0:54 [PATCH] ahci: imx: add missing clk_disable_unprepare() on error in imx_sata_enable() weiyj_lk
2014-07-30 2:37 ` Shawn Guo
@ 2014-07-30 16:06 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2014-07-30 16:06 UTC (permalink / raw)
To: weiyj_lk; +Cc: Grant Likely, Rob Herring, Shawn Guo, Wei Yongjun, linux-ide
On Wed, Jul 30, 2014 at 08:54:07AM +0800, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
Applied to libata/for-3.17.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-30 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30 0:54 [PATCH] ahci: imx: add missing clk_disable_unprepare() on error in imx_sata_enable() weiyj_lk
2014-07-30 2:37 ` Shawn Guo
2014-07-30 16:06 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).