[alsa-devel] [PATCH] ASoC: rsnd: core.c: add WARN_ON() on rsnd_channel_normalization()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Mon Oct 28 06:29:55 CET 2019
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
chan > 8 or chan < 0 shouldn't happen.
This patch uses WARN_ON() for such case.
Reported-by: Pavel Machek <pavel at denx.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
sound/soc/sh/rcar/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index e9242a0..295faad 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -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 */
--
2.7.4
More information about the Alsa-devel
mailing list