diff --git a/src/audio/dai-zephyr.c b/src/audio/dai-zephyr.c index 0a8d618a4e9e..d9830fd345dd 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -165,6 +165,9 @@ static int dai_get_hw_params(struct dai *dai, struct sof_ipc_stream_params *par { const struct dai_config *cfg = dai_config_get(dai->dev, dir); + if (!cfg) + return -EINVAL; + params->rate = cfg->rate; params->buffer_fmt = 0; params->channels = cfg->channels;