From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Date: Fri, 2 May 2014 15:56:29 +0000 (+0100)
Subject: ASoC: Intel: Fix allocated block list usage when adding blocks.
X-Git-Tag: firefly_0821_release~176^2~3834^2~6^2~7
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=84fbdd58614e35108ece5c79ada33443dbcdaf37;p=firefly-linux-kernel-4.4.55.git

ASoC: Intel: Fix allocated block list usage when adding blocks.

Make sure we add the allocated blocks to the modules list of blocks.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
---

diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index c4e7126ebc06..5fed75cef64f 100644
--- a/sound/soc/intel/sst-firmware.c
+++ b/sound/soc/intel/sst-firmware.c
@@ -202,6 +202,9 @@ static int block_alloc_contiguous(struct sst_module *module,
 		size -= block->size;
 	}
 
+	list_for_each_entry(block, &tmp, list)
+		list_add(&block->module_list, &module->block_list);
+
 	list_splice(&tmp, &dsp->used_block_list);
 	return 0;
 }