From: Vinod Koul Date: Mon, 20 Oct 2014 15:24:31 +0000 (+0530) Subject: ASoC: intel: log an error on double free X-Git-Tag: v6.6-pxa1908~22096^2~20^2~16^3~51 X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=790b4075b3a6845543d02ab29c81dc450e7b6794;p=linux.git ASoC: intel: log an error on double free the stream context should be freed only once on stream cleanup. If we ever hit a chance that stream context is getting double freed, though not an cause of panic as memory allocator can deal with this, we should still log this to help in finding issues and debugging Signed-off-by: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/sst/sst_drv_interface.c b/sound/soc/intel/sst/sst_drv_interface.c index aadb0dbaa01c..3a5e92096b82 100644 --- a/sound/soc/intel/sst/sst_drv_interface.c +++ b/sound/soc/intel/sst/sst_drv_interface.c @@ -55,6 +55,8 @@ int free_stream_context(struct intel_sst_drv *ctx, unsigned int str_id) if (ret) sst_clean_stream(&ctx->streams[str_id]); return ret; + } else { + dev_err(ctx->dev, "we tried to free stream context %d which was freed!!!\n", str_id); } return ret; }