diff mbox

ASoC: Intel: initial scalar variable ba

Message ID 1423052593-23796-1-git-send-email-yang.jie@intel.com (mailing list archive)
State Accepted
Commit c41cda1dbe50816d839c32271007c7b832d4d14a
Headers show

Commit Message

Jie, Yang Feb. 4, 2015, 12:23 p.m. UTC
Reported by Coverity: CID 1267985 CID 1267986

Fix these two Defects: Uninitialized scalar variable.

Signed-off-by: Jie Yang <yang.jie@intel.com>
---
 sound/soc/intel/sst-firmware.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mark Brown Feb. 4, 2015, 12:31 p.m. UTC | #1
On Wed, Feb 04, 2015 at 08:23:13PM +0800, Jie Yang wrote:
> Reported by Coverity: CID 1267985 CID 1267986
> 
> Fix these two Defects: Uninitialized scalar variable.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index a2ae2c5..5f71ef6 100644
--- a/sound/soc/intel/sst-firmware.c
+++ b/sound/soc/intel/sst-firmware.c
@@ -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;