Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1147091pxv; Fri, 9 Jul 2021 19:30:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyu2umR5vS5XJfLGdEsF8BEkAfQe/BobquMFWPzIquTusTq9i+UE54YvaUbgBy+059r21L X-Received: by 2002:a17:907:1c14:: with SMTP id nc20mr32692483ejc.140.1625884245571; Fri, 09 Jul 2021 19:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884245; cv=none; d=google.com; s=arc-20160816; b=OLZN1kRFDoELEAdVUNVwGbmKjGulzOx3Bzha4Syfy8q1x/xgY/ndA40+Jq85IK07jK EYifA2RXfPKOzZBVk6x0eEl+1U5MJMNacA1PRv+lXiUHBaa+mBoRYY4CJQjF6v6bUjEU syL2ZlSHhNfNXljBwojpzI9dlTDydN6cUuWg/d5904O9OvFU7viyRmR/uPzILYSCH4Xh J6cGzG6bB4Z0cOG1dvuFvNqn5SMV+pnyQ8xg9DGK26Ue8ekTUGXhbhA/HRxxc3IXzmny q03BtpLJW6BNijN5P+7gEoMfqU4CJbt5efSFNVkE+PFunv8oAuoL7fVn5/P+8T3tA7tT I8xA== 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=BN3KvfEGHf8v1ZcrQ22RjZuqf9HzYyETqPqqCiEhvck=; b=BVL3hGvqKTEA2RtvZsqcAp5pACvZqNRXF1VWPbGnUkZ+ooKdEWz2dCNCEMA13xzkBr 0khGAwH1LJDO04aeFZLUXf3C/6iWnGCDXi9hKEfDVtBIrxFNxF85d20BIoYf7jR4Gsyn z5GwF6akDK54raIExK1uU6cMFDzF04pK6nSIxDigaMKtGduMNukOo7kKdFSbWvrSPVJz dxSrlfW0U3HGR6YfBodA1TPO0nscsuCW7s+ZnwSEmvJoJ7HFzunAA3gv9G30DD284rjn mnw6kNxuYIKIjzprDfpYQAaaM4QGkOOscki4HxzHXg7dA4wxx7zVfXZxVMfBGALIm1tq nwdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q+Q+BtW9; 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 a8si8776001ejc.334.2021.07.09.19.30.22; Fri, 09 Jul 2021 19:30: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=q+Q+BtW9; 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 S233694AbhGJCcR (ORCPT + 99 others); Fri, 9 Jul 2021 22:32:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:42146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234317AbhGJC3W (ORCPT ); Fri, 9 Jul 2021 22:29:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2B3D461437; Sat, 10 Jul 2021 02:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883944; bh=3l0hm/n+PZ0Ti6m3rzVF1Hvo6vMMTW5neVE/CU70Buc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q+Q+BtW9ZSxXgVZCK6YABOWb6YUwR2rGVS7n6PdVtbxAcocKRdYOxupMWTiKxnnky Mz5kIoZnV4DPCifqIsPZbJY9fGCaDh7/tvtLU/PoTBuzlQm7LtcONUZ41/iK9J9VyE 2+lJPWBheJySEtcVZXyxOU/Md4ObpuXT3SB1kz5+LbVMZ7LzXW9XGfVSS9NFq8xbEq r451Y7to8LtLIgdqRHCY/GQQQH1s6NZzCo1WkV6nAuydLp1yMVGifwL8tqnHaKIpPL ihHbHwYvxNP5VUw9Nw3Rrtj0NF9gNvCoAKuc8+vtk2l7EahgOta8nacmi4QeztggLT 3FAcU5XHg0MGw== 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.10 58/93] ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() Date: Fri, 9 Jul 2021 22:23:52 -0400 Message-Id: <20210710022428.3169839-58-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-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 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