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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On 01.10.2020 07:07, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

This fixed my issue. Thanks!

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

> ---
>   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




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux