diff options
author | Dharageswari.R <dharageswari.r@intel.com> | 2016-04-28 09:15:25 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-05-02 07:02:17 -0400 |
commit | 95536d8c29985167e745ff0d8c7cd7dcf4318e6b (patch) | |
tree | a0026e597bfa294973def2136ec27f34aae2d211 | |
parent | 0ce8428ba9ea13098b828d0881e28368a108709c (diff) |
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>
-rw-r--r-- | sound/soc/intel/skylake/skl-sst-dsp.c | 2 | ||||
-rw-r--r-- | sound/soc/intel/skylake/skl-sst.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.c b/sound/soc/intel/skylake/skl-sst-dsp.c index 2962ef22fc84..13c19855ee1a 100644 --- a/sound/soc/intel/skylake/skl-sst-dsp.c +++ b/sound/soc/intel/skylake/skl-sst-dsp.c | |||
@@ -336,8 +336,6 @@ void skl_dsp_free(struct sst_dsp *dsp) | |||
336 | skl_ipc_int_disable(dsp); | 336 | skl_ipc_int_disable(dsp); |
337 | 337 | ||
338 | free_irq(dsp->irq, dsp); | 338 | free_irq(dsp->irq, dsp); |
339 | dsp->cl_dev.ops.cl_cleanup_controller(dsp); | ||
340 | skl_cldma_int_disable(dsp); | ||
341 | skl_ipc_op_int_disable(dsp); | 339 | skl_ipc_op_int_disable(dsp); |
342 | skl_ipc_int_disable(dsp); | 340 | skl_ipc_int_disable(dsp); |
343 | 341 | ||
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) | |||
454 | skl_clear_module_table(ctx->dsp); | 454 | skl_clear_module_table(ctx->dsp); |
455 | skl_ipc_free(&ctx->ipc); | 455 | skl_ipc_free(&ctx->ipc); |
456 | ctx->dsp->ops->free(ctx->dsp); | 456 | ctx->dsp->ops->free(ctx->dsp); |
457 | if (ctx->boot_complete) { | ||
458 | ctx->dsp->cl_dev.ops.cl_cleanup_controller(ctx->dsp); | ||
459 | skl_cldma_int_disable(ctx->dsp); | ||
460 | } | ||
457 | } | 461 | } |
458 | EXPORT_SYMBOL_GPL(skl_sst_dsp_cleanup); | 462 | EXPORT_SYMBOL_GPL(skl_sst_dsp_cleanup); |
459 | 463 | ||