diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-05-27 11:40:34 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-05-27 11:15:26 +0100 |
commit | 6da8f00e7ac277ddfc72e255328dc5ff0378c3ee (patch) | |
tree | 8fb9faf6c6ee70b7a66d668cf4dae46f39161910 /sound/soc/sh | |
parent | 965386c97616c401b34cba4e9e3bfc9c6b215359 (diff) |
ASoC: rsnd: ignore runtime NULL case at rsnd_runtime_channel_original_with_params()
runtime might be NULL. Let's ignore such case.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <875yz4nbkt.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/rcar/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 8696a993c478..eef4f77e105b 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, |