summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-08-15 14:25:08 +0300
committerNiklas Cassel <cassel@kernel.org>2024-08-15 13:44:33 +0200
commit66afec7c6992a04f8ab65b54421bdb5f8ac806e6 (patch)
tree0e3ef39873d62fd8bbc002b6bdab3ff0401bea30 /drivers/ata
parentaa3ca1faf3222af7aaa194a910995820135fc54e (diff)
ata: ahci_imx: Fix error code in probe()
Return a negative error code if devm_clk_get() fails. Don't return success. Fixes: 3156e1b2c071 ("ata: ahci_imx: AHB clock rate setting is not required on i.MX8QM AHCI SATA") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/cbcbdfc2-ddc7-4684-8ad4-018227823546@stanley.mountain Signed-off-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci_imx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 65f98e8fdf07..6f955e9105e8 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -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;