From: Daniel Mack Date: Tue, 7 Oct 2014 12:33:46 +0000 (+0200) Subject: ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb() X-Git-Tag: v4.9.8~5095^2~82^2~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e63dfccf34d4dbf21429c4919f33c028ff49991;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 731fdb5..14a3df1 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) } 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; }