OSDN Git Service

ASoC: wcd-spi: clear bit whether spi clk is disabled
authorwloot <wlootlxt123@gmail.com>
Thu, 11 Jul 2019 18:24:54 +0000 (02:24 +0800)
committerArian <arian.kulmer@web.de>
Tue, 19 Nov 2019 15:24:39 +0000 (16:24 +0100)
Change-Id: I2648736a26a3743a4faa98f03f182c0c3420c91a

sound/soc/codecs/wcd-spi.c

index fde1d3e..9a84738 100644 (file)
@@ -602,8 +602,11 @@ static int wcd_spi_clk_disable(struct spi_device *spi)
        if (IS_ERR_VALUE(ret))
                dev_err(&spi->dev, "%s: Failed, err = %d\n",
                        __func__, ret);
-       else
-               clear_bit(WCD_SPI_CLK_STATE_ENABLED, &wcd_spi->status_mask);
+       /*
+        * clear this bit even if clock disable failed
+        * as the source clocks might get turned off.
+        */
+       clear_bit(WCD_SPI_CLK_STATE_ENABLED, &wcd_spi->status_mask);
 
        return ret;
 }