summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-04-15 18:49:54 +0100
committerMark Brown <broonie@kernel.org>2017-04-18 18:53:40 +0100
commitd7766aa57ab0084498add21ddbf99547116f6b71 (patch)
tree71e144bd13fa29e424b4fec0c0eb21233f872035 /sound
parentb6e38b2944f1153199becefb14ae3ee01778863e (diff)
downloadop-kernel-dev-d7766aa57ab0084498add21ddbf99547116f6b71.zip
op-kernel-dev-d7766aa57ab0084498add21ddbf99547116f6b71.tar.gz
ASoC: topology: use j for internal loop counter
Currently variable i is being for 2 nested for loops. Fix this by using integer loop counter j for the inside for loop. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-topology.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 8e3df8b..3a58188 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -495,12 +495,13 @@ static void remove_widget(struct snd_soc_component *comp,
struct snd_kcontrol *kcontrol = w->kcontrols[i];
struct soc_enum *se =
(struct soc_enum *)kcontrol->private_value;
+ int j;
snd_ctl_remove(card, kcontrol);
kfree(se->dobj.control.dvalues);
- for (i = 0; i < se->items; i++)
- kfree(se->dobj.control.dtexts[i]);
+ for (j = 0; j < se->items; j++)
+ kfree(se->dobj.control.dtexts[j]);
kfree(se);
}
OpenPOWER on IntegriCloud