Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}
	}