All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()
@ 2020-10-01  5:07 ` Kuninori Morimoto
  2020-10-01  5:24   ` Marek Szyprowski
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2020-10-01  5:07 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Marek Szyprowski


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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>
---
 sound/soc/soc-pcm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 9d3460c19353..03fc9119151c 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -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:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()
  2020-10-01  5:07 ` [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open() Kuninori Morimoto
@ 2020-10-01  5:24   ` Marek Szyprowski
  2020-10-01 15:12   ` Mark Brown
  2020-10-01 22:46   ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Marek Szyprowski @ 2020-10-01  5:24 UTC (permalink / raw)
  To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA

Hi

On 01.10.2020 07:07, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> 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>

This fixed my issue. Thanks!

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
>   sound/soc/soc-pcm.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index 9d3460c19353..03fc9119151c 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -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
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()
  2020-10-01  5:07 ` [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open() Kuninori Morimoto
  2020-10-01  5:24   ` Marek Szyprowski
@ 2020-10-01 15:12   ` Mark Brown
  2020-10-01 22:02     ` Mark Brown
  2020-10-01 22:46   ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2020-10-01 15:12 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Marek Szyprowski

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

On Thu, Oct 01, 2020 at 02:07:41PM +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> 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)?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()
  2020-10-01 15:12   ` Mark Brown
@ 2020-10-01 22:02     ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2020-10-01 22:02 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Marek Szyprowski

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

On Thu, Oct 01, 2020 at 04:12:14PM +0100, Mark Brown wrote:
> On Thu, Oct 01, 2020 at 02:07:41PM +0900, Kuninori Morimoto wrote:
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open()
  2020-10-01  5:07 ` [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open() Kuninori Morimoto
  2020-10-01  5:24   ` Marek Szyprowski
  2020-10-01 15:12   ` Mark Brown
@ 2020-10-01 22:46   ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2020-10-01 22:46 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Marek Szyprowski

On 01 Oct 2020 14:07:41 +0900, Kuninori Morimoto wrote:
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-01 22:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20201001050743eucas1p16f018e6dc7a7f5100453b5eb3ee7a691@eucas1p1.samsung.com>
2020-10-01  5:07 ` [PATCH] ASoC: soc-pcm: add missing ret=0 at soc_pcm_open() Kuninori Morimoto
2020-10-01  5:24   ` Marek Szyprowski
2020-10-01 15:12   ` Mark Brown
2020-10-01 22:02     ` Mark Brown
2020-10-01 22:46   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.