Skip to content

Commit 66afec7

Browse files
Dan Carpenterfloatious
authored andcommitted
ata: ahci_imx: Fix error code in probe()
Return a negative error code if devm_clk_get() fails. Don't return success. Fixes: 3156e1b ("ata: ahci_imx: AHB clock rate setting is not required on i.MX8QM AHCI SATA") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Cassel <[email protected]>
1 parent aa3ca1f commit 66afec7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/ata/ahci_imx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
963963
imxpriv->ahb_clk = devm_clk_get(dev, "ahb");
964964
if (IS_ERR(imxpriv->ahb_clk)) {
965965
dev_err(dev, "Failed to get ahb clock\n");
966+
ret = PTR_ERR(imxpriv->ahb_clk);
966967
goto disable_sata;
967968
}
968969
reg_val = clk_get_rate(imxpriv->ahb_clk) / 1000;

0 commit comments

Comments
 (0)