From f5c7bc7a1fad4e1e8d3d29d71dd9f430a3350f42 Mon Sep 17 00:00:00 2001 From: Su Hui Date: Fri, 20 Oct 2023 17:26:20 +0800 Subject: 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 Link: https://lore.kernel.org/r/20231020092619.210520-1-suhui@nfschina.com Signed-off-by: Mark Brown --- sound/soc/intel/skylake/skl-pcm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound/soc/intel/skylake') diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index 9f7b0a944bb1..91f1fa24a3f1 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -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 + -- cgit v1.2.3