forked from Minki/linux
ASoC: ak4613: Fix out of bounds array access for ak4613_iface
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2ea659a9ef
commit
b5f2a487f5
@ -345,7 +345,7 @@ static int ak4613_dai_hw_params(struct snd_pcm_substream *substream,
|
|||||||
if (ak4613_dai_fmt_matching(priv->iface, is_play, fmt, width))
|
if (ak4613_dai_fmt_matching(priv->iface, is_play, fmt, width))
|
||||||
iface = priv->iface;
|
iface = priv->iface;
|
||||||
} else {
|
} 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,
|
if (!ak4613_dai_fmt_matching(ak4613_iface + i,
|
||||||
is_play,
|
is_play,
|
||||||
fmt, width))
|
fmt, width))
|
||||||
|
Loading…
Reference in New Issue
Block a user