Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1143390pxv; Fri, 9 Jul 2021 19:22:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4PdrfqXdKwBli1hj4B5cTqac3zijHzSr1prC9R82M/3PzUFc+12O3iuN+V3g1sHbvbSrT X-Received: by 2002:a05:6402:524d:: with SMTP id t13mr50394877edd.303.1625883771720; Fri, 09 Jul 2021 19:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625883771; cv=none; d=google.com; s=arc-20160816; b=ZFHesusQIKIRq1Z7ZIwXzgHJx2qGHU0yeATINvsvOVk5Xk9hHMy670GNGm8IZjeElD VxVieJ2cbE5ZlP8UMCFPFwSVo7S7+LLzqbjdx70hXWaWQw9VO7oHVKZTZwxe5ogjc5G8 DEX3Tpqne7V8RWrDjYL2exkw9IV+ajuQIXt5DIbpSnrx7py6txGQW2APPrWOMtwSyvAy cTdehHf8yMZNTjmUzT6+k1vpuoNvHmdr08dH2fX2RKe1GW4eMHS6y5HyHYDIYYE5QNNQ Fu1SJ4Vq0MXt7Y+OkO6GUosHIbc6S8sftSLkBThYO0idFuTRHSRDLE0ahW5dKBdbMi4g RAyg== 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=tZNfsgeyDlSxOtyg3kBTqOKSP6XvPygB5H1TWiiEkXg=; b=e5zE119b0mym46JwER4abxFD6Js5JcNGVJ0PsOmhHglGuExxRWvZuhTBSIa0TbpjpK vUPVbggEFY2dTpyh2FyNnIq2Nfcf0FImIgRMNbYGGli8tXb8YOdcFZHzhHebFWc6QtIv a7C7TI0q2go1BJ8ixZ6S//IjZgoT29ygbXx2jogHeW6RLa1NgwRbhofEcigKrL9jqSNu sqnUe+eUew08pKvpRFq8oYSAdu3hiGcQiaUmtJSOlVrwjtc61cJEjbXsIMzwPNar3jNI 6uYdJz1+0X2aKkEqoIwKcUUwgavRBy0Ic0NU9vDM2wfjznQN6/EcpZwmGu2alGQAGusx D8FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jo6MB4kt; 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 bo20si9516116edb.17.2021.07.09.19.22.28; Fri, 09 Jul 2021 19:22:51 -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=jo6MB4kt; 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 S232941AbhGJCXT (ORCPT + 99 others); Fri, 9 Jul 2021 22:23:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:38592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232123AbhGJCWH (ORCPT ); Fri, 9 Jul 2021 22:22:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 19FA4613BE; Sat, 10 Jul 2021 02:19:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883561; bh=YScusCExGV176r/kpK860fBFuQetm23YemSEX6cobH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jo6MB4kt69rCwt94rYlZcezwzzVZbU3M7Agqo/iXNi0csbNlCfNkz6BLvPqTorCl5 ddlJ7IicmVWt6RAOgU/S7Cau4yHwpqejRsChkvwXYiGze+FXU2sRpp795gj2oWRf1x HQue4K6uIfJYlSscBTHPPmgqALUoc22DqNdDOa0w7vsNiF7YXYscgpvHZIeg+bncnv sEFrtx4Fnbix2FVZBigDsD5R2LnBOIjmhmoT4yt8J2V5Q7yJz3+U8Y8rKcgS3OCuRM 44JVdy0sRvXmpKIiN5IdjME/5fu8EVSK8kV+tL8UDV8QaHsguSsKp+5VAeqzP+L+lI 3uo8SrJ5tTaeA== 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.13 069/114] ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() Date: Fri, 9 Jul 2021 22:17:03 -0400 Message-Id: <20210710021748.3167666-69-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710021748.3167666-1-sashal@kernel.org> References: <20210710021748.3167666-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 8659089a87a0..46513bb97904 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1700,7 +1700,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