[PATCH 01/10] ASoC: rsnd: ignore runtime NULL case at rsnd_runtime_channel_original_with_params()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue May 25 02:02:41 CEST 2021
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
runtime might be NULL. Let's ignore such case.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
sound/soc/sh/rcar/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 11b1e6f3ae40..684eab6ef126 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -267,8 +267,9 @@ int rsnd_runtime_channel_original_with_params(struct rsnd_dai_stream *io,
*/
if (params)
return params_channels(params);
- else
+ else if (runtime)
return runtime->channels;
+ return 0;
}
int rsnd_runtime_channel_after_ctu_with_params(struct rsnd_dai_stream *io,
--
2.25.1
More information about the Alsa-devel
mailing list