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

Commit 8115d611 authored by Chaithanya Krishna Bacharaju's avatar Chaithanya Krishna Bacharaju
Browse files

ASoC: wcd9335: Avoid wrong decimator connection



Previously assigned decimator value gets wrongly used in
following iterations leading to improper decimator connection
to slimbus port. Avoid this issue by declaring the variable
locally.

Change-Id: Ifbff8da9a3e594ee065a9beab7d9f8f65a4853ea
Signed-off-by: default avatarChaithanya Krishna Bacharaju <chaithan@codeaurora.org>
parent 844aad38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11478,10 +11478,10 @@ static int tasha_set_decimator_rate(struct snd_soc_dai *dai,
	struct tasha_priv *tasha = snd_soc_codec_get_drvdata(codec);
	u32 tx_port;
	u8 shift, shift_val, tx_mux_sel;
	int decimator = -1;
	u16 tx_port_reg, tx_fs_reg;

	list_for_each_entry(ch, &tasha->dai[dai->id].wcd9xxx_ch_list, list) {
		int decimator = -1;
		tx_port = ch->port;
		dev_dbg(codec->dev, "%s: dai->id = %d, tx_port = %d",
			__func__, dai->id, tx_port);