From: Christian Engelmayer Date: Sun, 13 Apr 2014 20:46:31 +0000 (+0200) Subject: ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dd1b94bf4920cc12545883faa43c014efbf61b1e;p=linux-beck.git 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. Signed-off-by: Christian Engelmayer Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index f7687107cf7f..f24619adc3d1 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -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; }