Skip to contentSkip to conversation

ASoC: Intel: initial scalar variable ba

PATCH Applied Jie Yang 2 participants 2 messages Feb 4, 2015

Subsystems (3)
lore
Share & tools
lore

Jie Yang

author
#0 lore raw

PATCH 1/1 ASoC: Intel: initial scalar variable ba

Reported by Coverity: CID 1267985 CID 1267986

Fix these two Defects: Uninitialized scalar variable.

---
 sound/soc/intel/sst-firmware.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/intel/sst-firmware.c +2 -0
index a2ae2c5..5f71ef6 100644
@@ -791,6 +791,7 @@ int sst_module_alloc_blocks(struct sst_module *module)
 	struct sst_block_allocator ba;
 	int ret;
 
+	memset(&ba, 0, sizeof(ba));
 	ba.size = module->size;
 	ba.type = module->type;
 	ba.offset = module->offset;
@@ -864,6 +865,7 @@ int sst_module_runtime_alloc_blocks(struct sst_module_runtime *runtime,
 	if (module->persistent_size == 0)
 		return 0;
 
+	memset(&ba, 0, sizeof(ba));
 	ba.size = module->persistent_size;
 	ba.type = SST_MEM_DRAM;
 
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Jie Yang

Reported by Coverity: CID 1267985 CID 1267986

Fix these two Defects: Uninitialized scalar variable.

Applied, thanks.