mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 03:43:03 +00:00
Merge "ASoC: msm: handle null pointer access issue at audio client"
This commit is contained in:
commit
e642844b8e
|
@ -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__,
|
||||
|
|
Loading…
Reference in a new issue