[PATCH v2 4/6] spi: rockchip: Fix runtime resume error handling
Heiko Stuebner
heiko at sntech.de
Fri Nov 13 05:50:15 PST 2026
From: Heiko Stuebner <heiko.stuebner at cherry.de>
When enabling the apb-clock any error does get handled, but when an
error happens enabling the spiclk itself, only the apb-clock is disabled
but the function then returns successful.
Fix this by also reporting the error on enabling the second clock.
Signed-off-by: Heiko Stuebner <heiko.stuebner at cherry.de>
---
drivers/spi/spi-rockchip.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index 1a81fd94b439..8bb55d52d346 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -994,8 +994,10 @@ static int rockchip_spi_runtime_resume(struct device *dev)
return ret;
ret = clk_prepare_enable(rs->spiclk);
- if (ret < 0)
+ if (ret < 0) {
clk_disable_unprepare(rs->apb_pclk);
+ return ret;
+ }
return 0;
}
--
2.53.0
More information about the Linux-rockchip
mailing list