ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch()
authorChristian Engelmayer <cengelma@gmx.at>
Sun, 13 Apr 2014 20:46:31 +0000 (22:46 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 15 Apr 2014 11:12:34 +0000 (12:12 +0100)
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.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/intel/sst-firmware.c

index f7687107cf7f51f19a95992b79819270e3dd4734..f24619adc3d1ab11fef6f2ca9f7b06754ca1abc1 100644 (file)
@@ -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;
        }