diff options
-rw-r--r-- | sound/soc/intel/sst-firmware.c | 8 |
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, | |||
244 | /* do we span > 1 blocks */ | 244 | /* do we span > 1 blocks */ |
245 | if (data->size > block->size) { | 245 | if (data->size > block->size) { |
246 | ret = block_alloc_contiguous(module, data, | 246 | ret = block_alloc_contiguous(module, data, |
247 | block->offset + block->size, | 247 | block->offset, data->size); |
248 | data->size - block->size); | ||
249 | if (ret == 0) | 248 | if (ret == 0) |
250 | return ret; | 249 | return ret; |
251 | } | 250 | } |
@@ -341,7 +340,7 @@ static int block_alloc_fixed(struct sst_module *module, | |||
341 | 340 | ||
342 | err = block_alloc_contiguous(module, data, | 341 | err = block_alloc_contiguous(module, data, |
343 | block->offset + block->size, | 342 | block->offset + block->size, |
344 | data->size - block->size + data->offset - block->offset); | 343 | data->size - block->size); |
345 | if (err < 0) | 344 | if (err < 0) |
346 | return -ENOMEM; | 345 | return -ENOMEM; |
347 | 346 | ||
@@ -368,8 +367,7 @@ static int block_alloc_fixed(struct sst_module *module, | |||
368 | if (data->offset >= block->offset && data->offset < block_end) { | 367 | if (data->offset >= block->offset && data->offset < block_end) { |
369 | 368 | ||
370 | err = block_alloc_contiguous(module, data, | 369 | err = block_alloc_contiguous(module, data, |
371 | block->offset + block->size, | 370 | block->offset, data->size); |
372 | data->size - block->size); | ||
373 | if (err < 0) | 371 | if (err < 0) |
374 | return -ENOMEM; | 372 | return -ENOMEM; |
375 | 373 | ||