Browse Source

ASoC: wcd-spi: initialize local variable 'status'

Variable 'status' is used without initialization.
Initialize it to the right value.

Change-Id: I7f43d8905d8192e5f308e9fd00a52eb531f2f698
Signed-off-by: Xiaoyu Ye <[email protected]>
Xiaoyu Ye 7 years ago
parent
commit
e908ba91db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      asoc/codecs/wcd-spi.c

+ 1 - 1
asoc/codecs/wcd-spi.c

@@ -522,7 +522,7 @@ static int wcd_spi_cmd_rdsr(struct spi_device *spi,
 	struct spi_transfer *tx_xfer = &wcd_spi->xfer2[0];
 	struct spi_transfer *rx_xfer = &wcd_spi->xfer2[1];
 	u8 rdsr_cmd;
-	u32 status;
+	u32 status = 0;
 	int ret;
 
 	rdsr_cmd = WCD_SPI_CMD_RDSR;