* [PATCH] ASoC: core: Fix return code shown on error for hw_params
@ 2018-05-30 15:12 Jon Hunter
2018-05-30 15:16 ` Jon Hunter
0 siblings, 1 reply; 2+ messages in thread
From: Jon Hunter @ 2018-05-30 15:12 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-kernel, Jon Hunter
The call to hw_params for a component fails the error code is held by
the variable '__ret' but the error message displays the value held by
the variable 'ret'. Fix the return code shown when hw_params fails for
a component.
Fixes: b8135864d4d3 ("ASoC: snd_soc_component_driver has snd_pcm_ops")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
sound/soc/soc-pcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 2df4719a84db..9376eb476364 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -956,7 +956,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
if (__ret < 0) {
dev_err(component->dev,
"ASoC: %s hw params failed: %d\n",
- component->name, ret);
+ component->name, __ret);
ret = __ret;
}
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: core: Fix return code shown on error for hw_params
2018-05-30 15:12 [PATCH] ASoC: core: Fix return code shown on error for hw_params Jon Hunter
@ 2018-05-30 15:16 ` Jon Hunter
0 siblings, 0 replies; 2+ messages in thread
From: Jon Hunter @ 2018-05-30 15:16 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-kernel
On 30/05/18 16:12, Jon Hunter wrote:
> The call to hw_params for a component fails the error code is held by
> the variable '__ret' but the error message displays the value held by
> the variable 'ret'. Fix the return code shown when hw_params fails for
> a component.
Sorry, just resent this as I realise the description does not read correctly!
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-30 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-30 15:12 [PATCH] ASoC: core: Fix return code shown on error for hw_params Jon Hunter
2018-05-30 15:16 ` Jon Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox