aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2014-10-07 08:33:46 -0400
committerMark Brown <broonie@kernel.org>2014-10-07 14:14:20 -0400
commit5e63dfccf34d4dbf21429c4919f33c028ff49991 (patch)
treeff920c6c766a5db6331fc967821e8975c1187998 /sound
parentdecc27b01d584c985c231e73d3b493de6ec07af8 (diff)
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
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 731fdb5b5f9b..14a3df1ff1ac 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -352,7 +352,7 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream)
352 } else { 352 } else {
353 for (i = 0; i < rtd->num_codecs; i++) { 353 for (i = 0; i < rtd->num_codecs; i++) {
354 codec_dai = rtd->codec_dais[i]; 354 codec_dai = rtd->codec_dais[i];
355 if (codec_dai->driver->playback.sig_bits == 0) { 355 if (codec_dai->driver->capture.sig_bits == 0) {
356 bits = 0; 356 bits = 0;
357 break; 357 break;
358 } 358 }