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: b8135864d4
("ASoC: snd_soc_component_driver has snd_pcm_ops")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c25f256625
commit
b91530f0a3
|
@ -956,7 +956,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
|
||||||
if (__ret < 0) {
|
if (__ret < 0) {
|
||||||
dev_err(component->dev,
|
dev_err(component->dev,
|
||||||
"ASoC: %s hw params failed: %d\n",
|
"ASoC: %s hw params failed: %d\n",
|
||||||
component->name, ret);
|
component->name, __ret);
|
||||||
ret = __ret;
|
ret = __ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue