mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: pl022: handle clk_prepare_enable() failure on runtime resume
@ 2026-11-17  2:07 Luo Yifan
  2026-11-17  3:02 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Luo Yifan @ 2026-11-17  2:07 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio
  Cc: Eugen Hristev, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea,
	linux-arm-kernel, linux-kernel

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@cmss.chinamobile.com>
---
 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-17  3:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17  2:07 [PATCH] spi: pl022: handle clk_prepare_enable() failure on runtime resume Luo Yifan
2026-11-17  3:02 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®