Skip to content

Commit

Permalink
ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()
Browse files Browse the repository at this point in the history
commit 140a453 ("ASoC: soc-pcm: add soc_pcm_clean() and call it
from soc_pcm_open/close()") switched to use soc_pcm_clean() at
soc_pcm_open().

But it removed "return 0", and missing "ret = 0",
because of it, it always return -EINVAL eventhough no error.
This patch adds missing "ret = 0" for success case.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/87ft6ya65z.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Oct 1, 2020
1 parent cb2fce9 commit 8e7875a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
runtime->hw.rate_max);
dynamic:
snd_soc_runtime_activate(rtd, substream->stream);
ret = 0;
err:
mutex_unlock(&rtd->card->pcm_mutex);
pm_err:
Expand Down

0 comments on commit 8e7875a

Please sign in to comment.