From: Kuninori Morimoto Date: Thu, 27 May 2021 02:40:34 +0000 (+0900) Subject: ASoC: rsnd: ignore runtime NULL case at rsnd_runtime_channel_original_with_params() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6da8f00e7ac277ddfc72e255328dc5ff0378c3ee;p=linux.git 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 Message-Id: <875yz4nbkt.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown --- diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 8696a993c478c..eef4f77e105b1 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,