diff options
author | Su Hui <suhui@nfschina.com> | 2023-10-20 12:26:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-10-25 19:21:42 +0300 |
commit | f5c7bc7a1fad4e1e8d3d29d71dd9f430a3350f42 (patch) | |
tree | 3e6340b0ed9fde5fb495b259e16cea970d17bd5a /sound | |
parent | 7618ab524935667699afed76fb83bc9bb38710ec (diff) | |
download | linux-f5c7bc7a1fad4e1e8d3d29d71dd9f430a3350f42.tar.xz |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/intel/skylake/skl-pcm.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 + |