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

Commit 65976878 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown
Browse files

ASoC: Intel: Skylake: Move up pipe mem free



The MCPS is freed first thing in pmd events but non memory. So if
we face error during teardown we leak this mem, so move the code
up

Signed-off-by: default avatarJeeja KP <jeeja.kp@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2434caf0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -652,6 +652,7 @@ static int skl_tplg_mixer_dapm_post_pmd_event(struct snd_soc_dapm_widget *w,
	int ret = 0;
	int ret = 0;


	skl_tplg_free_pipe_mcps(skl, mconfig);
	skl_tplg_free_pipe_mcps(skl, mconfig);
	skl_tplg_free_pipe_mem(skl, mconfig);


	list_for_each_entry(w_module, &s_pipe->w_list, node) {
	list_for_each_entry(w_module, &s_pipe->w_list, node) {
		dst_module = w_module->w->priv;
		dst_module = w_module->w->priv;
@@ -670,7 +671,6 @@ static int skl_tplg_mixer_dapm_post_pmd_event(struct snd_soc_dapm_widget *w,
	}
	}


	ret = skl_delete_pipe(ctx, mconfig->pipe);
	ret = skl_delete_pipe(ctx, mconfig->pipe);
	skl_tplg_free_pipe_mem(skl, mconfig);


	return ret;
	return ret;
}
}