mirror of https://github.com/thesofproject/sof.git
dai-zephyr: handle dai_config_get() errors properly
Add error check in dai_get_hw_params() for the case where dai_config_get() returns an error. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
parent
2b85c2c358
commit
1b02c92eff
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue