Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e92ad0d2 authored by Bhalchandra Gajare's avatar Bhalchandra Gajare
Browse files

ASoC: wcd-spi: Initialize local variables before usage



Initliaze the local variables that are used in functions to return
success or error codes. This fixes possible cases where undefined
error codes are returned.

CRs-Fixed: 1070186
Change-Id: I74bed6cfd9753765b15d17d69ba30f61875e87c8
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent 67598d84
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ static int wcd_spi_transfer_split(struct spi_device *spi,
	u32 addr = data_msg->remote_addr;
	u8 *data = data_msg->data;
	int remain_size = data_msg->len;
	int to_xfer, loop_cnt, ret;
	int to_xfer, loop_cnt, ret = 0;

	/* Perform single writes until multi word alignment is met */
	loop_cnt = 1;
@@ -837,7 +837,7 @@ static int wdsp_spi_event_handler(struct device *dev, void *priv_data,
				  void *data)
{
	struct spi_device *spi = to_spi_device(dev);
	int ret;
	int ret = 0;

	dev_dbg(&spi->dev, "%s: event type %d\n",
		__func__, event);