2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-30 13:34:44 +08:00

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: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
This commit is contained in:
Daniel Mack 2014-10-07 14:33:46 +02:00 committed by Mark Brown
parent decc27b01d
commit 5e63dfccf3

View File

@ -352,7 +352,7 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream)
} else {
for (i = 0; i < rtd->num_codecs; 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;
break;
}