Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp385643pxb; Thu, 21 Jan 2021 09:19:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZf7suO4X/3F6BKjD0Afawv/DTgnsDk0D0nxw9D0CGjgbly+UAx88kSuCQL7YRYFncnZBx X-Received: by 2002:a50:fc18:: with SMTP id i24mr145900edr.308.1611249576432; Thu, 21 Jan 2021 09:19:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611249576; cv=none; d=google.com; s=arc-20160816; b=eHMW9sZ16ROC5aForPBnCoYW/IgV5JyxwYQAGHjBInRSDE6wuN0RdXeiPyUUv5P9lV Q15nc9YwgkeF9drRuAhz3b56+GuIvRNR4lQyZ/nXAmhuUyw0yZppRRZnNsXfWeaigINt THmtdu5GX59QH7eTqBhrm2PWQFSIW0zW7LWqCGkkEsGNN8+hnXQrCXqg2tEvO4vNJOvV 7CKkG1B6SQbHP1Tnk4rhbjZRSECodTe1lL/07ZyuRYySM2CeCnaO1+WMnGYHY6RqS4VA ce0ZVmcU/4jOCXJDedp2//x2acQeSF2JV7zk6Q8uy+/8aLkiz5sl00QYEQo9FEuU7zru Aiaw== 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=R37OwwWmnd3gx+4QWJQscKseQ469mdd6BDRuEqSONlc=; b=iByPqavrb3HS1Egrkdcmg7bz3orlfaX1648cpK+Ku+KbAhP/ShNu41OONbIXiT7ulv 5Hqpw300PScAhQiURfNgW/yrf7w/H/aMaxFtrgqrPFeQu6YJw8jlHX97qjnF1S6MYbAo 4pkT4GdZ+EsZjHkyVCel41aU2Qga0h15ooKrqe5HH8hN04k4648le/PrgTza7VHcCoVe 8PxAT7ZIW6s1yXGsZYBAoJsbveuhmYciZnXAUZioTjfdMYyRQrcdgYkiKUFiOCXs1BCa UR0WkdYH8NcpmvYcBg8agXLDu6M5SQmQHvZjEdONzB4GthwFOyD5r8Cipnk6nVOcXAyB Bbxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CWn25tIi; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si1760569eds.374.2021.01.21.09.19.11; Thu, 21 Jan 2021 09:19:36 -0800 (PST) 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=@chromium.org header.s=google header.b=CWn25tIi; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388718AbhAURR4 (ORCPT + 99 others); Thu, 21 Jan 2021 12:17:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388719AbhAURRa (ORCPT ); Thu, 21 Jan 2021 12:17:30 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03EADC061756 for ; Thu, 21 Jan 2021 09:16:49 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id g3so3695414ejb.6 for ; Thu, 21 Jan 2021 09:16:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R37OwwWmnd3gx+4QWJQscKseQ469mdd6BDRuEqSONlc=; b=CWn25tIicWFL5R/EoP0Lw4d3jigOs6L3lg+H8SEmtOHGMseHtmldYRKeFKZ4IZZPFI FbX562x4NKV151mntW0uUcYzfQm7qac71gge153zpsQH6FIr5EtA5YBEBr412WLSwoFP ucz1a79Zr9a8/QFF/N0/vZt2L6smCUZGQAxi0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R37OwwWmnd3gx+4QWJQscKseQ469mdd6BDRuEqSONlc=; b=sAi1kSpW5SW3gsuziJ5LCUOJ8/ACMh7DJ2ebry55244NcEAWJp+XR7J3V+HDgDE7FJ t8AG/3X5yT7f6tkOC2F99O7WhIunu74GuyjidKaz8+ufQxsbPSbn2xmteqBdUiFOPjNZ D+4OL39xLoT69c4TY61ZmCm+SNv1BR045IRmzP0BBPzN5dE2WQBsg3oBtw67Aglq4Lu2 ZYcrs8ggIOeEN751EN+7P9d1mizFOmsekvH5WW3+fTYoKoJ2PMMcjEmaixHIYKeOWAxQ boXadliXMZgQr9SnMFwgajmwHQ7vjBakGjZwgWHdlcMWB3PcEQS88FsyDzpnMnTmiRZd c6Zw== X-Gm-Message-State: AOAM531lJwR/UttpqW+nebcf7WW1N8gCJenCSwjA3/FtFQBc4E42Nued Au9OHmo8MbLR5oR8ev8d3MwHWw== X-Received: by 2002:a17:906:eb12:: with SMTP id mb18mr309753ejb.257.1611249407746; Thu, 21 Jan 2021 09:16:47 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id q9sm2484024ejd.113.2021.01.21.09.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 09:16:47 -0800 (PST) From: Ricardo Ribalda To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Mateusz Gorski , Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Lukasz Majczak Cc: Ricardo Ribalda Subject: [PATCH v2 2/2] ASoC: Intel: Skylake: Zero snd_ctl_elem_value Date: Thu, 21 Jan 2021 18:16:44 +0100 Message-Id: <20210121171644.131059-2-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.296.g2bfb1c46d8-goog In-Reply-To: <20210121171644.131059-1-ribalda@chromium.org> References: <20210121171644.131059-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clear struct snd_ctl_elem_value before calling ->put() to avoid any data leak. Signed-off-by: Ricardo Ribalda --- 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 1ef30ca45410..b824086203b9 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -3632,7 +3632,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.30.0.296.g2bfb1c46d8-goog