Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp410886pxb; Thu, 21 Jan 2021 09:56:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJz13XE6inCl+RRkFzZ+3uGaMf0ZLnsZy7/ug9GonMHYZE/AIvh22NlBf4NexnChnEV6QwCk X-Received: by 2002:aa7:c849:: with SMTP id g9mr281865edt.48.1611251791895; Thu, 21 Jan 2021 09:56:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611251791; cv=none; d=google.com; s=arc-20160816; b=Vq8+Vr6AcNk0oHvcTTJTFZirtuNvQoEuHfRDU49x5Rf8VOZCSK+q25cNxa3pzE/AxG jO4x3GdHAHhpbJm93Lb4CjmwSTU0AuBi0z/g3iU4EyGx/VpzCN0b0bP3n62i7HCYO7Gj B+ricDD1ETD+Fh/WbCXEYkNWhtPzrfzgAkTzb/mbAJJ0XQI5N4L6Ypv1etkNtMEVdt4M WMaiiWqcCAemj55GvcTPkcOtCCij6yBXNt3R7zQMoq7PIW8ovDsoWmG08yLOxQQ+4ahC OHgx/EAkFA0hlRBRHHLPZ2EbNdWZrM6dVZf28gkvRlAAE+ZFsADRF4CrORQ65irae4p4 Mt6g== 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=OCYYVMv5s714jVuwCabaovHSIiuYo1Mak9GI7N7bfpA=; b=mMLA4RjsYT/X+TnN2mNSimkShPNMKQlkEWtU36ggstiEOABICbAvRnW4nQtNIGJdPf +UZgTZGWZ82+CG7W2tV+7EcJxt4Y1TC34KAA+t3OHjs0z6VgU32NLLYv4RHP1dJMGXGl 90CSffENw44pgOV1fN+h9MDZ/qLy1oS7IQM2NlPgJJwJmO9dWLi/lW7NlZjZwTG99UFq YTk6kLZeSxXNiEYquTjWpbJ3x3eD0vKL1sR8cjSbJq8hvRxZR4tTOmRyIq77k7/PIxcW 4NOjF2/gDMU97uFB9TyZ2Zp7nJp6tu2t2IZudbNeIM6VG66gxOK6ozg2WKismV0i1e78 y8qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cuSirrQ1; 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 n5si2547076eda.301.2021.01.21.09.56.08; Thu, 21 Jan 2021 09:56:31 -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=cuSirrQ1; 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 S2389205AbhAURwn (ORCPT + 99 others); Thu, 21 Jan 2021 12:52:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389097AbhAURwh (ORCPT ); Thu, 21 Jan 2021 12:52:37 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C01DC0613D6 for ; Thu, 21 Jan 2021 09:51:55 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id b2so3550247edm.3 for ; Thu, 21 Jan 2021 09:51:55 -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=OCYYVMv5s714jVuwCabaovHSIiuYo1Mak9GI7N7bfpA=; b=cuSirrQ1oaAAyphXl4bCIjli2fQoncNhitI0+YSQr3brIfsbP9VbBs3jzssRkA++JE LG1K19NciHMQYyvSknHr5rL/fS73Lz6NxQ8nGH+Nb+j2A/pHWblY+1UbzpLedlTywnSI ZxPmTnpt0Py/TXigz0VWFJxdtIKfzBpfQdwjc= 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=OCYYVMv5s714jVuwCabaovHSIiuYo1Mak9GI7N7bfpA=; b=VcgjWfUTt0td7/LVpY74CKNT+lW0nKwiEUMqRUrZbTHk7ovmToUCcuwfSmsjoTK8rf CIzKfkm8Mc9jzaH4Ro3S4sAy0l+uejK/LWwyAYfHwByZtFU1MetlkBh3EWzu8TT24wEs rNDAOdecH9xn5kUiEcpIcXqJNhx2Ct/H3QWOXbt6zYqJawDUy12j1nsUeenGLpUyiToQ jhWmguGDMJSQ44ArRJdbP0zDRU4EcnTd4jqfWYala15j0gketddOFWx3uIFruEgho/eo n2Duff1ZsEkvtyw789FIqKJne6nyp4mc3lwYJRZjRA9QeT5Iho4wodHPneRJowZfpQ3s bNvQ== X-Gm-Message-State: AOAM531yg5AZXvN+2/4dxFLtgW5R4DqCLrXlb8IzC0CQVL2Nd05BHZpM iFITDPHYyHTG+6twTCkBced6JA== X-Received: by 2002:a05:6402:1249:: with SMTP id l9mr201913edw.375.1611251514174; Thu, 21 Jan 2021 09:51:54 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id w16sm3232349edv.4.2021.01.21.09.51.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 09:51:53 -0800 (PST) From: Ricardo Ribalda To: Andy Shevchenko , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Mateusz Gorski , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Lukasz Majczak Cc: Ricardo Ribalda Subject: [PATCH v3 2/2] ASoC: Intel: Skylake: Zero snd_ctl_elem_value Date: Thu, 21 Jan 2021 18:51:51 +0100 Message-Id: <20210121175151.139111-2-ribalda@chromium.org> X-Mailer: git-send-email 2.30.0.296.g2bfb1c46d8-goog In-Reply-To: <20210121175151.139111-1-ribalda@chromium.org> References: <20210121175151.139111-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. Reviewed-by: Andy Shevchenko Reviewed-by: Cezary Rojewski 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 ffd37aaecdf1..76a04a883e63 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