Merge "ASoC: msm: handle null pointer access issue at audio client"

This commit is contained in:
Linux Build Service Account 2015-10-26 10:09:30 -07:00 committed by Gerrit - the friendly Code Review server
commit e642844b8e

View file

@ -285,6 +285,11 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)
pr_err("%s: platform data not populated\n", __func__);
return -EINVAL;
}
if (!prtd || !prtd->audio_client) {
pr_err("%s: private data null or audio client freed\n",
__func__);
return -EINVAL;
}
params = &soc_prtd->dpcm[substream->stream].hw_params;
pr_debug("%s\n", __func__);
@ -366,6 +371,11 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
pr_err("%s: platform data not populated\n", __func__);
return -EINVAL;
}
if (!prtd || !prtd->audio_client) {
pr_err("%s: private data null or audio client freed\n",
__func__);
return -EINVAL;
}
if (prtd->enabled == IDLE) {
pr_debug("%s:perf_mode=%d periods=%d\n", __func__,