ASoC: topology: handle endianness warning
[sfrench/cifs-2.6.git] / sound / soc / soc-topology.c
index 88f849b119da6aa8f638581dc9997643fe9103b5..7a4559ddf90353dcb39515d0c98df04431d130f1 100644 (file)
@@ -1485,7 +1485,7 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,
        if (!kcontrol_type)
                goto err;
 
-       for (i = 0; i < w->num_kcontrols; i++) {
+       for (i = 0; i < le32_to_cpu(w->num_kcontrols); i++) {
                control_hdr = (struct snd_soc_tplg_ctl_hdr *)tplg->pos;
                switch (le32_to_cpu(control_hdr->ops.info)) {
                case SND_SOC_TPLG_CTL_VOLSW: