summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/pcm512x.c
diff options
context:
space:
mode:
authorQais Yousef2015-01-14 09:47:29 +0100
committerMark Brown2015-01-15 16:54:04 +0100
commitd3268a40d4b19ff7bee23f52eabbc4e96bb685e8 (patch)
treebc4e4def39a6e0ee15ac23cea0c91c78d3e47834 /sound/soc/codecs/pcm512x.c
parentLinux 3.19-rc1 (diff)
downloadkernel-qcow2-linux-d3268a40d4b19ff7bee23f52eabbc4e96bb685e8.tar.gz
kernel-qcow2-linux-d3268a40d4b19ff7bee23f52eabbc4e96bb685e8.tar.xz
kernel-qcow2-linux-d3268a40d4b19ff7bee23f52eabbc4e96bb685e8.zip
ASoC: soc-compress.c: fix NULL dereference
In soc_new_compress() when rtd->dai_link->dynamic is set, we create the pcm substreams with this call: ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, 1, 0, &be_pcm); which passes 0 as capture_count leading to be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream being NULL, hence when trying to set rtd a few lines below we get an oops. Fix by using rtd->dai_link->dpcm_playback and rtd->dai_link->dpcm_capture as playback_count and capture_count to snd_pcm_new_internal(). Signed-off-by: Qais Yousef <qais.yousef@imgtec.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'sound/soc/codecs/pcm512x.c')
0 files changed, 0 insertions, 0 deletions