未验证 提交 b91530f0 编写于 作者: J Jon Hunter 提交者: 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: NJon Hunter <jonathanh@nvidia.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册