linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: soc-component: Add missed return for calling soc_component_ret
@ 2020-07-16  5:07 Shengjiu Wang
  2020-07-16  6:18 ` Kuninori Morimoto
  2020-07-16 23:57 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Shengjiu Wang @ 2020-07-16  5:07 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, kuninori.morimoto.gx,
	ranjani.sridharan, alsa-devel, linux-kernel

Add missed return for calling soc_component_ret, otherwise the return
value is wrong.

Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
changes in v2
- add missed return in snd_soc_pcm_component_sync_stop and
- snd_soc_pcm_component_new

 sound/soc/soc-component.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index af9909c5492f..9565a0dd7cb6 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -647,7 +647,7 @@ int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream)
 			ret = component->driver->sync_stop(component,
 							   substream);
 			if (ret < 0)
-				soc_component_ret(component, ret);
+				return soc_component_ret(component, ret);
 		}
 	}
 
@@ -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));
@@ -723,7 +723,7 @@ int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd)
 		if (component->driver->pcm_construct) {
 			ret = component->driver->pcm_construct(component, rtd);
 			if (ret < 0)
-				soc_component_ret(component, ret);
+				return soc_component_ret(component, ret);
 		}
 	}
 
-- 
2.27.0


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

* Re: [PATCH v2] ASoC: soc-component: Add missed return for calling soc_component_ret
  2020-07-16  5:07 [PATCH v2] ASoC: soc-component: Add missed return for calling soc_component_ret Shengjiu Wang
@ 2020-07-16  6:18 ` Kuninori Morimoto
  2020-07-16 23:57 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2020-07-16  6:18 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: lgirdwood, broonie, perex, tiwai, ranjani.sridharan, alsa-devel,
	linux-kernel


Hi Shengjiu

> Add missed return for calling soc_component_ret, otherwise the return
> value is wrong.
> 
> Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH v2] ASoC: soc-component: Add missed return for calling soc_component_ret
  2020-07-16  5:07 [PATCH v2] ASoC: soc-component: Add missed return for calling soc_component_ret Shengjiu Wang
  2020-07-16  6:18 ` Kuninori Morimoto
@ 2020-07-16 23:57 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-07-16 23:57 UTC (permalink / raw)
  To: alsa-devel, kuninori.morimoto.gx, Shengjiu Wang, linux-kernel,
	ranjani.sridharan, tiwai, perex, lgirdwood

On Thu, 16 Jul 2020 13:07:08 +0800, Shengjiu Wang wrote:
> Add missed return for calling soc_component_ret, otherwise the return
> value is wrong.

Applied to

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

Thanks!

[1/1] ASoC: soc-component: Add missed return for calling soc_component_ret
      commit: be75db5772f93da3a6b52552f260ce9da8fbfff8

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] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  5:07 [PATCH v2] ASoC: soc-component: Add missed return for calling soc_component_ret Shengjiu Wang
2020-07-16  6:18 ` Kuninori Morimoto
2020-07-16 23:57 ` Mark Brown

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