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

Commit 95536d8c authored by Dharageswari.R's avatar Dharageswari.R Committed by Mark Brown
Browse files

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: default avatarDharageswari R <dharageswari.r@intel.com>
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 0ce8428b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -336,8 +336,6 @@ void skl_dsp_free(struct sst_dsp *dsp)
	skl_ipc_int_disable(dsp);

	free_irq(dsp->irq, dsp);
	dsp->cl_dev.ops.cl_cleanup_controller(dsp);
	skl_cldma_int_disable(dsp);
	skl_ipc_op_int_disable(dsp);
	skl_ipc_int_disable(dsp);

+4 −0
Original line number Diff line number Diff line
@@ -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);