提交 5e63dfcc 编写于 作者: D Daniel Mack 提交者: Mark Brown

ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb()

In the SNDRV_PCM_STREAM_CAPTURE branch in soc_pcm_apply_msb(), look at
sig_bits of the capture stream, not the playback one.

Spotted by coverity.
Signed-off-by: NDaniel Mack <daniel@zonque.org>
Signed-off-by: NMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
上级 decc27b0
...@@ -352,7 +352,7 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream) ...@@ -352,7 +352,7 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream)
} else { } else {
for (i = 0; i < rtd->num_codecs; i++) { for (i = 0; i < rtd->num_codecs; i++) {
codec_dai = rtd->codec_dais[i]; codec_dai = rtd->codec_dais[i];
if (codec_dai->driver->playback.sig_bits == 0) { if (codec_dai->driver->capture.sig_bits == 0) {
bits = 0; bits = 0;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册