Commit 66afec7c authored by Dan Carpenter's avatar Dan Carpenter Committed by Niklas Cassel

ata: ahci_imx: Fix error code in probe()

Return a negative error code if devm_clk_get() fails.  Don't return
success.

Fixes: 3156e1b2 ("ata: ahci_imx: AHB clock rate setting is not required on i.MX8QM AHCI SATA")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/cbcbdfc2-ddc7-4684-8ad4-018227823546@stanley.mountainSigned-off-by: default avatarNiklas Cassel <cassel@kernel.org>
parent aa3ca1fa
......@@ -963,6 +963,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
imxpriv->ahb_clk = devm_clk_get(dev, "ahb");
if (IS_ERR(imxpriv->ahb_clk)) {
dev_err(dev, "Failed to get ahb clock\n");
ret = PTR_ERR(imxpriv->ahb_clk);
goto disable_sata;
}
reg_val = clk_get_rate(imxpriv->ahb_clk) / 1000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment