Skip to contentSkip to conversation

ASoC: core: Fix return code shown on error for hw_params

PATCH RESEND New Jon Hunter 1 participant 1 message May 30, 2018

Subsystems (2)
lore
Share & tools
lore

Jon Hunter

author
#0 lore raw

PATCH RESEND 1/1 ASoC: core: Fix return code shown on error for hw_params

When 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")
---
 sound/soc/soc-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-pcm.c +1 -1
index 2df4719a84db..9376eb476364 100644
@@ -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;
 		}
 	}
Signature · 1 line
2.7.4