Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0746e0d2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: set pointer to NULL after free" into msm-4.9

parents b4763925 b88ed610
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1688,6 +1688,7 @@ static int msm_compr_playback_free(struct snd_compr_stream *cstream)
	kfree(pdata->dec_params[soc_prtd->dai_link->id]);
	pdata->dec_params[soc_prtd->dai_link->id] = NULL;
	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}
@@ -1747,6 +1748,7 @@ static int msm_compr_capture_free(struct snd_compr_stream *cstream)
	q6asm_audio_client_free(ac);

	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -682,6 +682,7 @@ static int msm_afe_close(struct snd_pcm_substream *substream)
	mutex_unlock(&prtd->lock);
	prtd->prepared--;
	kfree(prtd);
	runtime->private_data = NULL;
	return 0;
}
static int msm_afe_prepare(struct snd_pcm_substream *substream)
+2 −0
Original line number Diff line number Diff line
@@ -570,6 +570,8 @@ static int msm_pcm_close(struct snd_pcm_substream *substream)
					 SNDRV_PCM_STREAM_PLAYBACK :
					 SNDRV_PCM_STREAM_CAPTURE);
	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}

+3 −0
Original line number Diff line number Diff line
@@ -804,6 +804,8 @@ static int msm_pcm_playback_close(struct snd_pcm_substream *substream)
	msm_pcm_routing_dereg_phy_stream(soc_prtd->dai_link->id,
						SNDRV_PCM_STREAM_PLAYBACK);
	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}

@@ -909,6 +911,7 @@ static int msm_pcm_capture_close(struct snd_pcm_substream *substream)
	msm_pcm_routing_dereg_phy_stream(soc_prtd->dai_link->id,
		SNDRV_PCM_STREAM_CAPTURE);
	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}