summaryrefslogtreecommitdiff
path: root/sound/soc/intel/skylake/skl-sst.c
diff options
context:
space:
mode:
authorDharageswari.R <dharageswari.r@intel.com>2016-04-28 16:15:25 +0300
committerMark Brown <broonie@kernel.org>2016-05-02 14:02:17 +0300
commit95536d8c29985167e745ff0d8c7cd7dcf4318e6b (patch)
treea0026e597bfa294973def2136ec27f34aae2d211 /sound/soc/intel/skylake/skl-sst.c
parent0ce8428ba9ea13098b828d0881e28368a108709c (diff)
downloadlinux-95536d8c29985167e745ff0d8c7cd7dcf4318e6b.tar.xz
ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up
If request firmware fails at init, the code loader DMA allocation can be NULL, so check for boot complete before freeing up these resources Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/skl-sst.c')
-rw-r--r--sound/soc/intel/skylake/skl-sst.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index bec4a7c486fd..13ec8d53b526 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -454,6 +454,10 @@ void skl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx)
skl_clear_module_table(ctx->dsp);
skl_ipc_free(&ctx->ipc);
ctx->dsp->ops->free(ctx->dsp);
+ if (ctx->boot_complete) {
+ ctx->dsp->cl_dev.ops.cl_cleanup_controller(ctx->dsp);
+ skl_cldma_int_disable(ctx->dsp);
+ }
}
EXPORT_SYMBOL_GPL(skl_sst_dsp_cleanup);