Commit b91530f0 authored by Jon Hunter's avatar Jon Hunter Committed by Mark Brown

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: b8135864 ("ASoC: snd_soc_component_driver has snd_pcm_ops")
Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c25f2566
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment