spi: atcspi200: return error from failed controller suspend

spi_controller_suspend() can fail when the SPI core cannot stop the
controller. atcspi_suspend() ignored that error and disabled the
controller clock anyway.

Return the error before disabling the clock.

Signed-off-by: Jiawen Liu <1298662399@qq.com>
Link: https://patch.msgid.link/tencent_306FA547FD68D10EE4B2AE9C132060F12F06@qq.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Jiawen Liu
2026-06-20 12:39:28 +04:00
committed by Mark Brown
parent 44d09ef0ba
commit f4b14e67ba

View File

@@ -599,8 +599,11 @@ static int atcspi_suspend(struct device *dev)
{
struct spi_controller *host = dev_get_drvdata(dev);
struct atcspi_dev *spi = spi_controller_get_devdata(host);
int ret;
spi_controller_suspend(host);
ret = spi_controller_suspend(host);
if (ret)
return ret;
clk_disable_unprepare(spi->clk);