ASoC: Intel: initial scalar variable ba
Reported by Coverity: CID 1267985 CID 1267986
Fix these two Defects: Uninitialized scalar variable.
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index cad6ea1..dcc145f 100644
--- a/sound/soc/intel/sst-firmware.c
+++ b/sound/soc/intel/sst-firmware.c
@@ -786,6 +786,7 @@
struct sst_block_allocator ba;
int ret;
+ memset(&ba, 0, sizeof(ba));
ba.size = module->size;
ba.type = module->type;
ba.offset = module->offset;
@@ -859,6 +860,7 @@
if (module->persistent_size == 0)
return 0;
+ memset(&ba, 0, sizeof(ba));
ba.size = module->persistent_size;
ba.type = SST_MEM_DRAM;