Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19f5be0f authored by Wei Yongjun's avatar Wei Yongjun Committed by Tejun Heo
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarShawn Guo <shawn.guo@freescale.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 0185b1b7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);