aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSu Hui <[email protected]>2023-10-20 17:26:20 +0800
committerMark Brown <[email protected]>2023-10-25 17:21:42 +0100
commitf5c7bc7a1fad4e1e8d3d29d71dd9f430a3350f42 (patch)
tree3e6340b0ed9fde5fb495b259e16cea970d17bd5a
parent7618ab524935667699afed76fb83bc9bb38710ec (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/intel/skylake/skl-pcm.c3
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 +