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

Commit 14f1d6a2 authored by Kenneth Westfield's avatar Kenneth Westfield
Browse files

ASoC: Compress: Remove unused hw_params pointer



Remove the hw_params variable in
soc_compr_set_params_fe as the memory allocated
for it was not freed and the pointer itself was
not used.

CRs-Fixed: 601556
Change-Id: If2abfe58ad6dedab9b7ba21ae6f3b4bb5335cf42
Signed-off-by: default avatarKenneth Westfield <kwestfie@codeaurora.org>
parent 9c6389a6
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -474,7 +474,6 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
	struct snd_soc_pcm_runtime *fe = cstream->private_data;
	struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream;
	struct snd_soc_platform *platform = fe->platform;
	struct snd_pcm_hw_params *hw_params;
	int ret = 0, stream;

	if (cstream->direction == SND_COMPRESS_PLAYBACK)
@@ -482,10 +481,6 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
	else
		stream = SNDRV_PCM_STREAM_CAPTURE;

	hw_params = kzalloc(sizeof(*hw_params), GFP_KERNEL);
	if (hw_params == NULL)
		return -ENOMEM;

	mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME);

	/* first we call set_params for the platform driver