28 Oct
2019
28 Oct
'19
6:29 a.m.
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
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 --- 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