summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorCan Peng <pengcan@kylinos.cn>2026-08-04 15:20:17 +0800
committerMark Brown <broonie@kernel.org>2026-08-04 19:14:38 +0100
commit3b0cee02664041aea7e4f787c66cb86c82eb4e97 (patch)
tree32bf22534dc9d810c7968be9fc4c2baa5e5fecdc /drivers
parent2766401a9291bb246e62af40295fdc811703f912 (diff)
downloadlinux-3b0cee02664041aea7e4f787c66cb86c82eb4e97.tar.gz
linux-3b0cee02664041aea7e4f787c66cb86c82eb4e97.zip
spi: bcm63xx-hsspi: disable clocks on resume failure
bcm63xx_hsspi_resume() enables the HSSPI clock, and optionally the PLL clock, before restarting the SPI controller queue. If spi_controller_resume() fails, the function currently reports success and leaves those clocks enabled. Propagate the error and disable the clocks before returning. Fixes: 142168eba9dc ("spi: bcm63xx-hsspi: add bcm63xx HSSPI driver") Cc: stable@vger.kernel.org Signed-off-by: Can Peng <pengcan@kylinos.cn> Reviewed-by: Kursad Oney <kursad.oney@broadcom.com> Link: https://patch.msgid.link/20260804072017.860974-1-pengcan@kylinos.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-bcm63xx-hsspi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index 37b3534d0b0a..633164e5a856 100644
--- a/drivers/spi/spi-bcm63xx-hsspi.c
+++ b/drivers/spi/spi-bcm63xx-hsspi.c
@@ -919,7 +919,13 @@ static int bcm63xx_hsspi_resume(struct device *dev)
}
}
- spi_controller_resume(host);
+ ret = spi_controller_resume(host);
+ if (ret) {
+ if (bs->pll_clk)
+ clk_disable_unprepare(bs->pll_clk);
+ clk_disable_unprepare(bs->clk);
+ return ret;
+ }
return 0;
}