From: Jie Yang Date: Wed, 4 Feb 2015 12:23:13 +0000 (+0800) Subject: ASoC: Intel: initial scalar variable ba X-Git-Tag: firefly_0821_release~176^2~2367^2~13^2~6^4~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c41cda1dbe50816d839c32271007c7b832d4d14a;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index cad6ea179cea..dcc145f81ec9 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -786,6 +786,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; @@ -859,6 +860,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;