Skip to content

Commit

Permalink
ASoC: rsnd: ignore runtime NULL case at rsnd_runtime_channel_original…
Browse files Browse the repository at this point in the history
…_with_params()

runtime might be NULL. Let's ignore such case.

Signed-off-by: Kuninori Morimoto <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
morimoto authored and broonie committed May 27, 2021
1 parent 965386c commit 6da8f00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/sh/rcar/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6da8f00

Please sign in to comment.