Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 010E1C433E0 for ; Tue, 2 Feb 2021 15:09:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6ECA960235 for ; Tue, 2 Feb 2021 15:09:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6ECA960235 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EA9F3176A; Tue, 2 Feb 2021 16:08:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA9F3176A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1612278587; bh=zGOWMfDHkr8TWZlJpfuVr9hqDNvijQPfTVmErkzAxMM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jPP0m9VKT8DIeExsXfX4Liu9e5pDf5kwm5kxWlltAQY4i8FJtlBXaM/xPWZZ+fCYc zJ+Qeuz/IHd+LLrDCPZaG1UJJV68kRRMuvP22e+ByIBwvIp/LjmVtLt34TgwwCvP01 H2qZ2+smuPp6YU5lEnQoAKyIMOp4AwsRlLITPBuc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 044FAF802D2; Tue, 2 Feb 2021 16:07:07 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A252DF802DB; Tue, 2 Feb 2021 16:07:05 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A0B19F80290 for ; Tue, 2 Feb 2021 16:06:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A0B19F80290 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YsY1YBo6" Received: by mail.kernel.org (Postfix) with ESMTPSA id 4AFC864F85; Tue, 2 Feb 2021 15:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612278417; bh=zGOWMfDHkr8TWZlJpfuVr9hqDNvijQPfTVmErkzAxMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YsY1YBo6edaiAAjsdySjsdYayubfDmOJypGEk/F9Ev66NlH2mlbF4rQosw/53mEEF ElJzeCiTa7aSl36s7MjA9DRiDt4zp1J6yQOesAF69F5oD9oBBGALgekOzlOaMroVIU Hk6Sq7Z+YCLGb90Z7Gk2GvBQpCuR36bY0bHQ6bUcVYb5AxkvLAWsRmG9S1B/jUdNqn jowFLhju/ztEnoio+JjN4OdA0mf9mWGpSWxbZVAACULU0H21LbzQyQWMTYPq/DXSAW 9caRcIAV5Z85tUd0azVHZdRokqX+mlUbx5YUnfOZVOF4Y3x5DYtYXoWgPczppdLB2s K8h3kSj04Ve8g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 04/17] ASoC: Intel: Skylake: Zero snd_ctl_elem_value Date: Tue, 2 Feb 2021 10:06:38 -0500 Message-Id: <20210202150651.1864426-4-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210202150651.1864426-1-sashal@kernel.org> References: <20210202150651.1864426-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Cc: Sasha Levin , Cezary Rojewski , alsa-devel@alsa-project.org, Mark Brown , Ricardo Ribalda , Andy Shevchenko X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" From: Ricardo Ribalda [ Upstream commit 1d8fe0648e118fd495a2cb393a34eb8d428e7808 ] Clear struct snd_ctl_elem_value before calling ->put() to avoid any data leak. Signed-off-by: Ricardo Ribalda Reviewed-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210121171644.131059-2-ribalda@chromium.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index aa5833001fde5..b8e393bb716fb 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -3631,7 +3631,7 @@ static void skl_tplg_complete(struct snd_soc_component *component) sprintf(chan_text, "c%d", mach->mach_params.dmic_num); for (i = 0; i < se->items; i++) { - struct snd_ctl_elem_value val; + struct snd_ctl_elem_value val = {}; if (strstr(texts[i], chan_text)) { val.value.enumerated.item[0] = i; -- 2.27.0