mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
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: Pavel Machek <pavel@denx.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87y2x530a4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
35dac62747
commit
5db8617ba7
@ -302,7 +302,7 @@ int rsnd_runtime_channel_after_ctu_with_params(struct rsnd_dai_stream *io,
|
||||
|
||||
int rsnd_channel_normalization(int chan)
|
||||
{
|
||||
if ((chan > 8) || (chan < 0))
|
||||
if (WARN_ON((chan > 8) || (chan < 0)))
|
||||
return 0;
|
||||
|
||||
/* TDM Extend Mode needs 8ch */
|
||||
|
Loading…
Reference in New Issue
Block a user