summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/sst-firmware.c
diff options
context:
space:
mode:
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>2014-05-02 17:56:28 +0200
committerMark Brown <broonie@linaro.org>2014-05-07 10:38:29 +0200
commit2b39aab18a84b2fa348d42d894ef986b290d67a0 (patch)
tree9be5ba520b1aeb33238b4dc2fa64c3f7d26d2603 /sound/soc/intel/sst-firmware.c
parentASoC: Intel: Fix check for pdata usage before dereference. (diff)
downloadlinux-2b39aab18a84b2fa348d42d894ef986b290d67a0.tar.xz
linux-2b39aab18a84b2fa348d42d894ef986b290d67a0.zip
ASoC: Intel: Fix block offset calculations.
Block offset calculations are done in the contiguous allocator so are not required here. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/intel/sst-firmware.c')
-rw-r--r--sound/soc/intel/sst-firmware.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index c38cfda8003c..928f228c38e7 100644
--- a/sound/soc/intel/sst-firmware.c
+++ b/sound/soc/intel/sst-firmware.c
@@ -244,8 +244,7 @@ static int block_alloc(struct sst_module *module,
/* do we span > 1 blocks */
if (data->size > block->size) {
ret = block_alloc_contiguous(module, data,
- block->offset + block->size,
- data->size - block->size);
+ block->offset, data->size);
if (ret == 0)
return ret;
}
@@ -341,7 +340,7 @@ static int block_alloc_fixed(struct sst_module *module,
err = block_alloc_contiguous(module, data,
block->offset + block->size,
- data->size - block->size + data->offset - block->offset);
+ data->size - block->size);
if (err < 0)
return -ENOMEM;
@@ -368,8 +367,7 @@ static int block_alloc_fixed(struct sst_module *module,
if (data->offset >= block->offset && data->offset < block_end) {
err = block_alloc_contiguous(module, data,
- block->offset + block->size,
- data->size - block->size);
+ block->offset, data->size);
if (err < 0)
return -ENOMEM;