Skip to content

Commit

Permalink
ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Daniel Mack authored and Mark Brown committed Oct 7, 2014
1 parent decc27b commit 5e63dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5e63dfc

Please sign in to comment.