[PATCH] spi: pl022: handle clk_prepare_enable() failure on runtime resume

From: Luo Yifan

Date: Mon Nov 16 2026 - 21:07:25 EST


pl022_runtime_resume() ignores the return value of clk_prepare_enable()
and always returns 0. A failed runtime resume is therefore reported as
success and the controller is used with its clock off.

Return the error from clk_prepare_enable().

Signed-off-by: Luo Yifan <luoyifan@xxxxxxxxxxxxxxxxxxxx>
---
drivers/spi/spi-pl022.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index f52130465a..64bf9c4b0a 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2067,9 +2067,8 @@ static int pl022_runtime_resume(struct device *dev)
struct pl022 *pl022 = dev_get_drvdata(dev);

pinctrl_pm_select_default_state(dev);
- clk_prepare_enable(pl022->clk);

- return 0;
+ return clk_prepare_enable(pl022->clk);
}

static const struct dev_pm_ops pl022_dev_pm_ops = {
--
2.24.4