[PATCH 2/3] spi: ti-qspi: Abort probe when clock lookup fails

From: Felix Gu

Date: Wed Nov 04 2026 - 09:10:32 EST


Return the clock lookup error instead of continuing with an error
pointer that subsequent transfers can pass to clk_get_rate().

Fixes: 505a14954e2d ("spi/qspi: Add qspi flash controller")
Signed-off-by: Felix Gu <ustc.gu@xxxxxxxxx>
---
drivers/spi/spi-ti-qspi.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 0cc8c2d52226..2026fbcbeb90 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -844,6 +844,7 @@ static int ti_qspi_probe(struct platform_device *pdev)
if (IS_ERR(qspi->fclk)) {
ret = PTR_ERR(qspi->fclk);
dev_err(&pdev->dev, "could not get clk: %d\n", ret);
+ return ret;
}

pm_runtime_use_autosuspend(&pdev->dev);

--
2.53.0