mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 01:54:00 +00:00
ASoC: codecs: wcd934x: return error code correctly from hw_params
Error returned from wcd934x_slim_set_hw_params() are not passed to upper layer, this could be misleading to the user which can start sending stream leading to unnecessary errors. Fix this by properly returning the errors. Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114623.11891-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ea157c2ba8
commit
006ea27c4e
@ -1896,9 +1896,8 @@ static int wcd934x_hw_params(struct snd_pcm_substream *substream,
|
||||
}
|
||||
|
||||
wcd->dai[dai->id].sconfig.rate = params_rate(params);
|
||||
wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream);
|
||||
|
||||
return 0;
|
||||
return wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream);
|
||||
}
|
||||
|
||||
static int wcd934x_hw_free(struct snd_pcm_substream *substream,
|
||||
|
Loading…
x
Reference in New Issue
Block a user