Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp360176pxb; Wed, 20 Jan 2021 08:41:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoUMKMnavwMfBoKDhD6y5W3Ws+zgMBG6R3+jDnYT26STyZyQFZ6fMftJoplzA767MLL/1d X-Received: by 2002:a05:6402:5193:: with SMTP id q19mr8106314edd.264.1611160879184; Wed, 20 Jan 2021 08:41:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611160879; cv=none; d=google.com; s=arc-20160816; b=OhoQkR3PWXsc8FSH9jN19GZWRelS9tMUod+vNduzdbaI9tmRSBzGjgrhOUmGAIFEi2 PNKv0ESvyuVaZw9SK9jkW5Yh9VkSQHMN7Ch6Ic7alp3qGR8MpKu33hGrDqHgtIraixQY WYe9GmuefJ0wxEZL6s8s3+kzZoBPEh9KqL3WvnCZEHKt+Ft5J23BiiOH6SfpYWbfIC2F /NsBE0Y5nxipLIOBOQb2zh/h3oseQad7XM/Uor172ci9V+MKC17fr8X8kuorEQqMlRSi pb7o422bGqQZK1N5ShCSZCZvrOBufHMZu+Bkqa3GRRbL+4Ggve1mQkMxIuRYzlorp8Kf pOzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=VgOkykV6X/36L3Dgf7sbe9k7K5iq+o2C63i74VP/cjc=; b=IdvMWxlqGYAW6kgZHDzWor8pEOtjOmlqVSdwBqo1YrtXnXuelPRGJOntrpfRNwR+AO dWOEj+WQ4sKYKObesCAJ9fLaTCdFSETOxezaZUl2EIDerBgDd5DybRLA+7GuHpG9Qb4J 8jB0hY4JIbUZPFloBDaHJoLr2XNNc55sFy5/7S5P+iLtpt9gJy4FpqxPp8TCX+IpM/1M AFue8vS+wuazMVcTxw+86iDXqUYmaxkBnOUOOVlb1Q9Z30xv2mALVUfq4+gcpCzySKwE 0T4UPP6YkjDjENty+R8Kf8baMdkEad4OzE+bphlhi4g4JAQ3aWtWGyrVB9QJspLmj1b/ WF7w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si886189ejx.467.2021.01.20.08.40.53; Wed, 20 Jan 2021 08:41:19 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732743AbhATQiM (ORCPT + 99 others); Wed, 20 Jan 2021 11:38:12 -0500 Received: from mga06.intel.com ([134.134.136.31]:8540 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391387AbhATQfM (ORCPT ); Wed, 20 Jan 2021 11:35:12 -0500 IronPort-SDR: NTfWwIvawqACqSzBYKe2EHFlQ2bIYQWwrbYtNgP7JKxDkqLtS6/71ItDncH1M6WmtvYSIzxSUF cFdFteEOv2hQ== X-IronPort-AV: E=McAfee;i="6000,8403,9870"; a="240673440" X-IronPort-AV: E=Sophos;i="5.79,361,1602572400"; d="scan'208";a="240673440" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2021 08:33:23 -0800 IronPort-SDR: NaTwmjflADhRHtNI8n0obvI0Q7vHMzOHK+6I23GOLIWvsfLcOL1dFqajClmMBmHE+qn0RzpzKd YIBVWTkaq5xw== X-IronPort-AV: E=Sophos;i="5.79,361,1602572400"; d="scan'208";a="426954211" Received: from yperets-mobl1.ger.corp.intel.com (HELO [10.209.89.231]) ([10.209.89.231]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2021 08:33:21 -0800 Subject: Re: [PATCH v2] ASoC: Intel: Skylake: Check the kcontrol against NULL To: =?UTF-8?Q?=c5=81ukasz_Majczak?= Cc: Marcin Wojtas , Liam Girdwood , Mateusz Gorski , Radoslaw Biernacki , Alex Levin , Guenter Roeck , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Rojewski, Cezary" , =?UTF-8?Q?Amadeusz_S=c5=82awi=c5=84ski?= References: <20201210121438.7718-1-lma@semihalf.com> <20201217130439.141943-1-lma@semihalf.com> From: Pierre-Louis Bossart Message-ID: <8c22c415-1807-b673-20e3-bc8d7f4c05b7@linux.intel.com> Date: Wed, 20 Jan 2021 10:33:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/20/21 9:49 AM, Łukasz Majczak wrote: > Hi Pierre, > > Is there anything more to do to get the ACK for this patch? Adding Cezary and Amadeusz for feedback, I can't pretend having any sort of knowledge on the Skylake driver internals and topology usage. > Best regards, > Lukasz > > wt., 12 sty 2021 o 12:34 Łukasz Majczak napisał(a): >> >> Hi, >> >> This is just a kind reminder. Is there anything more required to >> upstream this patch? >> >> Best regards, >> Lukasz >> >> >> czw., 17 gru 2020 o 14:06 Lukasz Majczak napisał(a): >>> >>> There is no check for the kcontrol against NULL and in some cases >>> it causes kernel to crash. >>> >>> Fixes: 2d744ecf2b984 ("ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT") >>> Cc: # 5.4+ >>> Signed-off-by: Lukasz Majczak >>> Reviewed-by: Mateusz Gorski >>> --- >>> sound/soc/intel/skylake/skl-topology.c | 14 ++++++++++---- >>> 1 file changed, 10 insertions(+), 4 deletions(-) >>> v1 -> v2: fixed coding style >>> >>> diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c >>> index ae466cd592922..8f0bfda7096a9 100644 >>> --- a/sound/soc/intel/skylake/skl-topology.c >>> +++ b/sound/soc/intel/skylake/skl-topology.c >>> @@ -3618,12 +3618,18 @@ static void skl_tplg_complete(struct snd_soc_component *component) >>> int i; >>> >>> list_for_each_entry(dobj, &component->dobj_list, list) { >>> - struct snd_kcontrol *kcontrol = dobj->control.kcontrol; >>> - struct soc_enum *se = >>> - (struct soc_enum *)kcontrol->private_value; >>> - char **texts = dobj->control.dtexts; >>> + struct snd_kcontrol *kcontrol; >>> + struct soc_enum *se; >>> + char **texts; >>> char chan_text[4]; >>> >>> + kcontrol = dobj->control.kcontrol; >>> + if (!kcontrol) >>> + continue; >>> + >>> + se = (struct soc_enum *)kcontrol->private_value; >>> + texts = dobj->control.dtexts; >>> + >>> if (dobj->type != SND_SOC_DOBJ_ENUM || >>> dobj->control.kcontrol->put != >>> skl_tplg_multi_config_set_dmic) >>> -- >>> 2.25.1 >>>