Skip to content
Commit 86fc4998 authored by Jesper Juhl's avatar Jesper Juhl Committed by Mark Brown
Browse files

ASoC: cs42l73: don't use negative array index



If cs42l73_get_mclkx_coeff() returns < 0 (which it can) in
sound/soc/codecs/cs42l73.c::cs42l73_set_mclk(), then we'll be using
the (negative) return value as array index on the very next line of
code - that's bad.

Catch the negative return value and propagate it to the caller (which
checks for it) and things are a bit more sane :-)

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 7e1f7c8a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment