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: 142168eba9 ("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>
This commit is contained in:
Can Peng
2026-08-04 15:20:17 +08:00
committed by Mark Brown
parent 2766401a92
commit 3b0cee0266

View File

@@ -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;
}