Merge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/ak4642', 'asoc/topic...
[sfrench/cifs-2.6.git] / sound / soc / codecs / ak4613.c
index a4520a1f849d93950322727045e0876380286cd0..690edebf029eb53c213ace00c88e39b14c6b3d75 100644 (file)
@@ -407,7 +407,7 @@ static int ak4613_dai_hw_params(struct snd_pcm_substream *substream,
                if (ak4613_dai_fmt_matching(priv->iface, is_play, fmt, width))
                        iface = priv->iface;
        } else {
-               for (i = ARRAY_SIZE(ak4613_iface); i >= 0; i--) {
+               for (i = ARRAY_SIZE(ak4613_iface) - 1; i >= 0; i--) {
                        if (!ak4613_dai_fmt_matching(ak4613_iface + i,
                                                     is_play,
                                                     fmt, width))