ASoC: Intel: Skylake: add an error code check in skl_pcm_trigger

skl_decoupled_trigger() can return error code like -EPIPE if failed,
add check for this.

Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231020092619.210520-1-suhui@nfschina.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Su Hui 2023-10-20 17:26:20 +08:00 committed by Mark Brown
parent 7618ab5249
commit f5c7bc7a1f
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -518,6 +518,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
return ret;
ret = skl_decoupled_trigger(substream, cmd);
if (ret < 0)
return ret;
if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) {
/* save the dpib and lpib positions */
hstream->dpib = readl(bus->remap_addr +