* [PATCH] ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch()
@ 2014-04-13 20:46 Christian Engelmayer
2014-04-15 11:13 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Christian Engelmayer @ 2014-04-13 20:46 UTC (permalink / raw)
To: Liam Girdwood
Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Dan Carpenter,
Vinod Koul, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
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>
---
sound/soc/intel/sst-firmware.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index f768710..f24619a 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;
}
--
1.8.3.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch()
2014-04-13 20:46 [PATCH] ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch() Christian Engelmayer
@ 2014-04-15 11:13 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-04-15 11:13 UTC (permalink / raw)
To: Christian Engelmayer
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Dan Carpenter,
Vinod Koul, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
On Sun, Apr 13, 2014 at 10:46:31PM +0200, Christian Engelmayer wrote:
> 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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-15 11:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-13 20:46 [PATCH] ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch() Christian Engelmayer
2014-04-15 11:13 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox