linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-component: Add missed return for snd_soc_pcm_component_mmap
@ 2020-07-16  3:52 Shengjiu Wang
  2020-07-16  4:17 ` Kuninori Morimoto
  0 siblings, 1 reply; 3+ messages in thread
From: Shengjiu Wang @ 2020-07-16  3:52 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, kuninori.morimoto.gx,
	ranjani.sridharan, alsa-devel, linux-kernel

Add missed return for snd_soc_pcm_component_mmap, otherwise it always
return -EINVAL.

Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/soc-component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index af9909c5492f..cde7b9c609bb 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -705,7 +705,7 @@ int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream,
 	/* FIXME. it returns 1st mmap now */
 	for_each_rtd_components(rtd, i, component)
 		if (component->driver->mmap)
-			soc_component_ret(
+			return soc_component_ret(
 				component,
 				component->driver->mmap(component,
 							substream, vma));
-- 
2.27.0


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

* Re: [PATCH] ASoC: soc-component: Add missed return for snd_soc_pcm_component_mmap
  2020-07-16  3:52 [PATCH] ASoC: soc-component: Add missed return for snd_soc_pcm_component_mmap Shengjiu Wang
@ 2020-07-16  4:17 ` Kuninori Morimoto
  2020-07-16  4:49   ` Shengjiu Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Kuninori Morimoto @ 2020-07-16  4:17 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: lgirdwood, broonie, perex, tiwai, ranjani.sridharan, alsa-devel,
	linux-kernel


Hi Shengjiu

> Add missed return for snd_soc_pcm_component_mmap, otherwise it always
> return -EINVAL.
> 
> Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---

Oops, indeed.
Thank you for the patch.

But it seems these functions are also missing "return"
	snd_soc_pcm_component_new()
	snd_soc_pcm_component_sync_stop()

Can you please care these, too ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH] ASoC: soc-component: Add missed return for snd_soc_pcm_component_mmap
  2020-07-16  4:17 ` Kuninori Morimoto
@ 2020-07-16  4:49   ` Shengjiu Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Shengjiu Wang @ 2020-07-16  4:49 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Shengjiu Wang, Linux-ALSA, Liam Girdwood, linux-kernel,
	Takashi Iwai, ranjani.sridharan, Mark Brown

On Thu, Jul 16, 2020 at 12:19 PM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>
>
> Hi Shengjiu
>
> > Add missed return for snd_soc_pcm_component_mmap, otherwise it always
> > return -EINVAL.
> >
> > Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()")
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
>
> Oops, indeed.
> Thank you for the patch.
>
> But it seems these functions are also missing "return"
>         snd_soc_pcm_component_new()
>         snd_soc_pcm_component_sync_stop()
>
> Can you please care these, too ?
Ok, will send v2

best regards
wang shengjiu

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

end of thread, other threads:[~2020-07-16  4:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  3:52 [PATCH] ASoC: soc-component: Add missed return for snd_soc_pcm_component_mmap Shengjiu Wang
2020-07-16  4:17 ` Kuninori Morimoto
2020-07-16  4:49   ` Shengjiu Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).