summaryrefslogtreecommitdiff
path: root/sound/soc/intel/sst
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2014-10-20 19:24:31 +0400
committerMark Brown <broonie@kernel.org>2014-10-22 02:58:59 +0400
commit790b4075b3a6845543d02ab29c81dc450e7b6794 (patch)
treebe91cf3e1a2176b536cbd6bdf35b5ac17e8f6983 /sound/soc/intel/sst
parentb3baaa47cc49fab3ecffbbaee660ce003d17d1f7 (diff)
downloadlinux-790b4075b3a6845543d02ab29c81dc450e7b6794.tar.xz
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 <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/sst')
-rw-r--r--sound/soc/intel/sst/sst_drv_interface.c2
1 files changed, 2 insertions, 0 deletions
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;
}