Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1146015pxv; Fri, 9 Jul 2021 19:28:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe5OvOHixY4TbwnNqkr2kzDdN2b1A/J583ddSdKiNSDkOwHV7ltRvE4GLXEE3Z0Mw5vMbk X-Received: by 2002:aa7:c3d0:: with SMTP id l16mr4382247edr.225.1625884125154; Fri, 09 Jul 2021 19:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884125; cv=none; d=google.com; s=arc-20160816; b=uJ2Dyj9c84g0C/+ovYcjoW4nWJWrkHG9ePnRAhAltWoXszcFX+/PSiaMnig/3hp16V Am6ls2V/CuOgvBPBHZ3Xt15xDPFhhsX2KD7el2ACFTi8J1kVxVUCOfxSmdDx1uwlWlje VRv8nsML27TD79xAqPh/BVtCiraEHg5N579igt54m/vOOcN/Mh3OaH19hKziv/AhlxGn 5dC06cHyXABK0nOGSGK2a5zRWo5pmV7MSbFM6ndBSoUxMc+NBaKAZ9yhZbrV2NoaqMZh 3M5EqimfP02OZQ+ZmOtRAgxXep0DBELm15zEYCHxcHQ+8VXEB2NntFjnYHxLhJGYEU/s XMmg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3yUeoNB0a/qUTEWJrXZEHH1FCYAM+m1b7C5NgiJuaqk=; b=eEfLK3hiLXNTEf3L0zwUd4z5QL91Sf0WBX4qjZ/xk+uOJaHkHXwAKKrQFYIMqbj3Mb pNxgZdSD8JZDUShqyyflmSSBXSviWBay+5kCSgVH7vft6TH5cUXk1iCHWKHgD36IsaX5 QkczDJBOCPOgRcSd0+IKwPLbLnnIye2r5JGODv4J8tn6gsHsg+t9TfWqntvWiwdHrzBQ 95eJev4r/BpVEXcqthnSZ5fNiZ+CHMYgf6Hcf49x/wfxIXV9gVioAid7SSNBBxw71Bcn 6sDSnS151iR9P/AwkuqVYvbLpHmMszgzY2StVcl5KMk+0ETYysJC93ENSTgFgo+j+4UX 5XoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Up+dlVWq; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si10074624eds.273.2021.07.09.19.28.21; Fri, 09 Jul 2021 19:28: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=@kernel.org header.s=k20201202 header.b=Up+dlVWq; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233437AbhGJC1X (ORCPT + 99 others); Fri, 9 Jul 2021 22:27:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:42882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233241AbhGJC0G (ORCPT ); Fri, 9 Jul 2021 22:26:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 031D8613ED; Sat, 10 Jul 2021 02:23:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883799; bh=ZKJVrmLYGVPSJrHqQHBq6fK9ClMXludSvV3cqZNaBzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Up+dlVWqLtFsfSJ5ZvPnuEPab5OYeSJG5y+B/R59+/IGdsWQSQZPJtPjKH8Scx7N+ Eramb7DgDzE2sGrZ5NVUl+/WrqX6EWJ3TH/RqyirZY+GLxQQ/oOOfqrVdsxWHN82+S bX/WFAGABkpOJZCGNwQWc1hwKkgpGiLwZ3O4esdSgY/7XEKt1NQzVvsLIslS9QS+A9 rWunVa2j6bzWaXFI55KDULgZ+5V/tZvf5F0pleKtLNXIwwOZdHnA2Jln4HeONoT6GD bLOk1CmdNOoXbWcGdPkYYFOJTccgGGfBrnIZWJW6FX4WAqekNxs7U4PexPDqpdHjmD GQrZaMXbRJK0w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jaroslav Kysela , Mark Brown , Kuninori Morimoto , Sasha Levin , alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 5.12 063/104] ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() Date: Fri, 9 Jul 2021 22:21:15 -0400 Message-Id: <20210710022156.3168825-63-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022156.3168825-1-sashal@kernel.org> References: <20210710022156.3168825-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 14d85ca1e435..4a25a1e39831 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1695,7 +1695,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