aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/intel/haswell/sst-haswell-pcm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c b/sound/soc/intel/haswell/sst-haswell-pcm.c
index 23ae0400d6db..f97fa5ab93d3 100644
--- a/sound/soc/intel/haswell/sst-haswell-pcm.c
+++ b/sound/soc/intel/haswell/sst-haswell-pcm.c
@@ -928,10 +928,15 @@ static void hsw_pcm_free_modules(struct hsw_priv_data *pdata)
928 928
929 for (i = 0; i < ARRAY_SIZE(mod_map); i++) { 929 for (i = 0; i < ARRAY_SIZE(mod_map); i++) {
930 pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream]; 930 pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream];
931 sst_hsw_runtime_module_free(pcm_data->runtime); 931 if (pcm_data->runtime){
932 sst_hsw_runtime_module_free(pcm_data->runtime);
933 pcm_data->runtime = NULL;
934 }
932 } 935 }
933 if (sst_hsw_is_module_loaded(hsw, SST_HSW_MODULE_WAVES)) { 936 if (sst_hsw_is_module_loaded(hsw, SST_HSW_MODULE_WAVES) &&
937 pdata->runtime_waves) {
934 sst_hsw_runtime_module_free(pdata->runtime_waves); 938 sst_hsw_runtime_module_free(pdata->runtime_waves);
939 pdata->runtime_waves = NULL;
935 } 940 }
936} 941}
937 942