From patchwork Sun Apr 13 20:46:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Engelmayer X-Patchwork-Id: 3975311 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 827F99F2CC for ; Sun, 13 Apr 2014 20:47:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B56302024C for ; Sun, 13 Apr 2014 20:47:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 48FF620211 for ; Sun, 13 Apr 2014 20:47:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9B598261A69; Sun, 13 Apr 2014 22:47:12 +0200 (CEST) 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,FREEMAIL_FROM, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 018DA2619D9; Sun, 13 Apr 2014 22:46:53 +0200 (CEST) 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 C12E82619E6; Sun, 13 Apr 2014 22:46:50 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by alsa0.perex.cz (Postfix) with ESMTP id BC9242619D0 for ; Sun, 13 Apr 2014 22:46:42 +0200 (CEST) Received: from spike ([81.217.122.98]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MYfX0-1WUMps3Qjy-00VMgI; Sun, 13 Apr 2014 22:46:35 +0200 Date: Sun, 13 Apr 2014 22:46:31 +0200 From: Christian Engelmayer To: Liam Girdwood Message-ID: <20140413224631.1a1bdce1@spike> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.20; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Provags-ID: V03:K0:urjqqH/5jgmXr9ASZg4kovKwl0hf5pr0MM3NTt4pjmu7BMQ8OSX 4dUEToCprtkprt6EFMW5hwq/1Ny27qE+iHLZxBERR+EzUNwoXxud3Gz9h9i/aps56hmV2vF LEn9q/0Il9PdgRkJTuVztF01rkH5lZFxFHBWNEd5eIqqzNHC2RWI1TvaOsL1fHHLovVmyQY iCs4YZCE7Q0etvW0x7apA== Cc: alsa-devel@alsa-project.org, Takashi Iwai , linux-kernel@vger.kernel.org, Vinod Koul , Mark Brown , Dan Carpenter Subject: [alsa-devel] [PATCH] ASoC: Intel: Fix a self assignment in sst_mem_block_alloc_scratch() 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Remove a self assignment in sst_mem_block_alloc_scratch(). When calculating buffer sizes there is no need for statements without effect. Detected by Coverity: CID 1195249. Signed-off-by: Christian Engelmayer --- sound/soc/intel/sst-firmware.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index f768710..f24619a 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -505,9 +505,7 @@ struct sst_module *sst_mem_block_alloc_scratch(struct sst_dsp *dsp) /* calculate required scratch size */ list_for_each_entry(sst_module, &dsp->module_list, list) { - if (scratch->s.size > sst_module->s.size) - scratch->s.size = scratch->s.size; - else + if (scratch->s.size < sst_module->s.size) scratch->s.size = sst_module->s.size; }