Skip to contentSkip to conversation

ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()

PATCH In review Kuninori Morimoto 3 participants 5 messages Oct 1, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()

From: Kuninori Morimoto <[email protected]>

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.

---
 sound/soc/soc-pcm.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/soc-pcm.c +1 -0
index 9d3460c19353..03fc9119151c 100644
@@ -796,6 +796,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:
Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw

Hi

Quoted 6 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

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().

Quoted 6 lines

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.

This fixed my issue. Thanks!

Quoted 9 lines
---
  sound/soc/soc-pcm.c | 1 +
  1 file changed, 1 insertion(+)
sound/soc/soc-pcm.c +0 -0
index 9d3460c19353..03fc9119151c 100644

sound/soc/soc-pcm.c static int soc_pcm_open(struct snd_pcm_substream *substream) · line 802

Quoted 7 lines
sound/soc/soc-pcm.c +1 -0
@@ -796,6 +796,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:

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
maintainer
#2 lore raw
In reply to Kuninori Morimoto
Quoted 5 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

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().

This doesn't apply against current code, please check and resend (does it depend on your latest series you posted yesterday)?

maintainer
#3 lore raw
Quoted 9 lines · Mark Brown
Quoted 5 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

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().

This doesn't apply against current code, please check and resend (does it depend on your latest series you posted yesterday)?

Ah, looks like it was the other standalone fix you sent today - it applies now with that added.

maintainer
#4 lore raw
In reply to Kuninori Morimoto
Quoted 7 lines · Kuninori Morimoto

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.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()

      commit: 8e7875ae373a3690397c4e593629d3b9ad5ccf42

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark