[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cbcbdfc2-ddc7-4684-8ad4-018227823546@stanley.mountain>
Date: Thu, 15 Aug 2024 14:25:08 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Richard Zhu <hongxing.zhu@....com>
Cc: Damien Le Moal <dlemoal@...nel.org>, Niklas Cassel <cassel@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Frank Li <Frank.Li@....com>,
linux-ide@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] 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@...aro.org>
---
drivers/ata/ahci_imx.c | 1 +
1 file changed, 1 insertion(+)
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;
--
2.43.0
Powered by blists - more mailing lists