mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 15:43:08 -04:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user