Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3849859pxv; Mon, 19 Jul 2021 10:12:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycYEUALq/4Nc3O97hOGm+bZRGzANUT+AUdLkMFPmQwvVYG35u2ADC4BbENqoVj8gjfeJJk X-Received: by 2002:a50:c907:: with SMTP id o7mr35441038edh.120.1626714765195; Mon, 19 Jul 2021 10:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626714765; cv=none; d=google.com; s=arc-20160816; b=TnwvTTwMlhJ+qDCNVT8+qFWDESrDwMnabG2rTkp6qIRLH0o1s2gXYW79ex41x9puS2 tC9hA9RH/9CK14ZmmGhLkSXNE3eBaIQ8o03/KVjvtCVPm8Jbrao2qPYHuqGq4pmLasyZ a9C/vxnDWWFoCUr27eVImWsKTAeTB6nTtV6g/c6xw2L05cX3nc9Q1tMtH1zQHBaWBt61 G28qcsjbYFn2ZTKQWCgUqiGm6l5OeVhCemUwyTm9MMVq1+CfScQY58wSkK6IiiKsxQue Pm0QGgU35XHUGNiAXMMxg/t3yrScfidw501Tvj97/vDDm0P53D9TpleE6Q3A2jIVm7kk ocuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BN3KvfEGHf8v1ZcrQ22RjZuqf9HzYyETqPqqCiEhvck=; b=o2hBpquvedtKlY5zM0dc+7Wsxf5+rV/mip04Cz0gz+3yqdKb5Bn6z0i+EHrr33I+9J JbwrQUBee9ozTAHDPfOhfnGCjbinDvk3ENL8+oz2H9TZUFsi/hnaEgylRnySqaSYy6pQ RxwfoxOnHiEJ5oriNaz9b9SAsI0O8ivr9WeK58oxNA8Fsb2vnflLINMY+Rgwy1GUDFTL NL3u7ViBIz+Tam4jhBmgKI1ebX0j3olIxwdQrvQpQX+YR0RkQgQ7Sp5p+i0jtPuCwsbz 1gPK4PxWKRWFaaDDOWx9R31IT4I+y6RRj2UHhfNPW2xvymdtClawOeBJS2Gfo0SwWtNI XNNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fJwy3Pc6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si15914954edd.435.2021.07.19.10.12.22; Mon, 19 Jul 2021 10:12:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fJwy3Pc6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349421AbhGSQ2b (ORCPT + 99 others); Mon, 19 Jul 2021 12:28:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:55926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347153AbhGSPPn (ORCPT ); Mon, 19 Jul 2021 11:15:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0BFBD60200; Mon, 19 Jul 2021 15:56:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710182; bh=3l0hm/n+PZ0Ti6m3rzVF1Hvo6vMMTW5neVE/CU70Buc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fJwy3Pc6vS/48rqQ4YbofgRZv/6kKgizdzKVHYcjIEbshm2Ni4ubeqzu8ALUYu3kG CA8ywUP8qRu+xF7ABqoW3tzo1znq/n4eOhivMbKkYJJ8Co+vsIgswekCD9yINLgPLf cWti/BuTA8S74eofTpcZGL9t/ZfjX8Ngoj50/rGA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jaroslav Kysela , Mark Brown , Kuninori Morimoto , Sasha Levin Subject: [PATCH 5.10 076/243] ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() Date: Mon, 19 Jul 2021 16:51:45 +0200 Message-Id: <20210719144943.359012770@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jaroslav Kysela [ Upstream commit 12ffd726824a2f52486f72338b6fd3244b512959 ] In case, where the loops are not executed for a reason, the uninitialized variable 'err' is returned to the caller. Make code fully predictible and assign zero in the declaration. Signed-off-by: Jaroslav Kysela Cc: Mark Brown Cc: Kuninori Morimoto Link: https://lore.kernel.org/r/20210614071746.1787072-1-perex@perex.cz Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 91bf33958159..8b8a9aca2912 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1738,7 +1738,7 @@ static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream, struct snd_soc_dpcm *dpcm; struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(fe_substream); struct snd_soc_dai *fe_cpu_dai; - int err; + int err = 0; int i; /* apply symmetry for FE */ -- 2.30.2