Skip to content

Commit f5c7bc7

Browse files
Su Huibroonie
authored andcommitted
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>
1 parent 7618ab5 commit f5c7bc7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sound/soc/intel/skylake/skl-pcm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
518518
return ret;
519519

520520
ret = skl_decoupled_trigger(substream, cmd);
521+
if (ret < 0)
522+
return ret;
523+
521524
if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) {
522525
/* save the dpib and lpib positions */
523526
hstream->dpib = readl(bus->remap_addr +

0 commit comments

Comments
 (0)