From patchwork Wed Feb 4 12:23:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jie, Yang" X-Patchwork-Id: 5776241 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8F165BF440 for ; Wed, 4 Feb 2015 12:21:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8996201FA for ; Wed, 4 Feb 2015 12:21:32 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D1C51201DD for ; Wed, 4 Feb 2015 12:21:31 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4C1402615F3; Wed, 4 Feb 2015 13:21:30 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6013C261531; Wed, 4 Feb 2015 13:21:27 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 11A46261546; Wed, 4 Feb 2015 13:21:25 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by alsa0.perex.cz (Postfix) with ESMTP id A6AEB2614F4 for ; Wed, 4 Feb 2015 13:21:19 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 04 Feb 2015 04:17:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,518,1418112000"; d="scan'208";a="680720084" Received: from keyon-u1310.sh.intel.com ([10.239.13.15]) by orsmga002.jf.intel.com with ESMTP; 04 Feb 2015 04:21:15 -0800 From: Jie Yang To: broonie@kernel.org, tiwai@suse.de Date: Wed, 4 Feb 2015 20:23:13 +0800 Message-Id: <1423052593-23796-1-git-send-email-yang.jie@intel.com> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, liam.r.girdwood@intel.com Subject: [alsa-devel] [PATCH] ASoC: Intel: initial scalar variable ba X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Reported by Coverity: CID 1267985 CID 1267986 Fix these two Defects: Uninitialized scalar variable. Signed-off-by: Jie Yang --- sound/soc/intel/sst-firmware.c | 2 ++ 1 file changed, 2 insertions(+) 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;