Skip to contentSkip to conversation

ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch()

PATCH Applied Christian Engelmayer 2 participants 2 messages Apr 13, 2014 – Apr 15, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch()

Remove a self assignment in sst_mem_block_alloc_scratch(). When calculating buffer sizes there is no need for statements without effect. Detected by
Coverity: CID 1195249.

---
 sound/soc/intel/sst-firmware.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/intel/sst-firmware.c +1 -3
index f768710..f24619a 100644
@@ -505,9 +505,7 @@ struct sst_module *sst_mem_block_alloc_scratch(struct sst_dsp *dsp)
 
 	/* calculate required scratch size */
 	list_for_each_entry(sst_module, &dsp->module_list, list) {
-		if (scratch->s.size > sst_module->s.size)
-			scratch->s.size = scratch->s.size;
-		else
+		if (scratch->s.size < sst_module->s.size)
 			scratch->s.size = sst_module->s.size;
 	}
 
Signature · 1 line
1.8.3.2
maintainer Applied
#1 lore raw
Quoted 3 lines · Christian Engelmayer

Remove a self assignment in sst_mem_block_alloc_scratch(). When calculating buffer sizes there is no need for statements without effect. Detected by
Coverity: CID 1195249.

Applied, thanks.