aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-10-01 14:07:41 +0900
committerMark Brown <broonie@kernel.org>2020-10-01 20:42:20 +0100
commit8e7875ae373a3690397c4e593629d3b9ad5ccf42 (patch)
treebb7bdbcc5c530eaa255a0188cb6a3b0fc63a2e6c /sound/soc/soc-pcm.c
parentASoC: soc-pcm: ignore un-needed mutex_unlock() case on soc_pcm_open() (diff)
downloadlinux-dev-8e7875ae373a3690397c4e593629d3b9ad5ccf42.tar.xz
linux-dev-8e7875ae373a3690397c4e593629d3b9ad5ccf42.zip
ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()
commit 140a4532cdb8c ("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>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 5d538520e2cf..dcab9527ba3d 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -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: