Commit 5db8617b authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: rsnd: core.c: add WARN_ON() on rsnd_channel_normalization()

chan > 8 or chan < 0 shouldn't happen.
This patch uses WARN_ON() for such case.
Reported-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2x530a4.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 35dac627
...@@ -302,7 +302,7 @@ int rsnd_runtime_channel_after_ctu_with_params(struct rsnd_dai_stream *io, ...@@ -302,7 +302,7 @@ int rsnd_runtime_channel_after_ctu_with_params(struct rsnd_dai_stream *io,
int rsnd_channel_normalization(int chan) int rsnd_channel_normalization(int chan)
{ {
if ((chan > 8) || (chan < 0)) if (WARN_ON((chan > 8) || (chan < 0)))
return 0; return 0;
/* TDM Extend Mode needs 8ch */ /* TDM Extend Mode needs 8ch */
......
Markdown is supported
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