diff --git a/dsp/q6adm.c b/dsp/q6adm.c index ea4892e5c8ae..f9a71d934a03 100644 --- a/dsp/q6adm.c +++ b/dsp/q6adm.c @@ -4049,7 +4049,7 @@ int adm_close(int port_id, int perf_mode, int copp_idx) pr_debug("%s: cma_alloc %d\n", __func__, cal_block->cma_mem); } - if (app_type == 0) { + if (result && app_type == 0) { audproc_cal_info = cal_block->cal_info; app_type = audproc_cal_info->app_type; } @@ -4139,7 +4139,7 @@ int adm_close(int port_id, int perf_mode, int copp_idx) pr_debug("%s: cma_alloc %d\n", __func__, cal_block->cma_mem); } - if (app_type == 0) { + if (result && app_type == 0) { audproc_cal_info = cal_block->cal_info; app_type = audproc_cal_info->app_type; }