[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <371e612ac59c458cad1bafb82ca09c9f@intel.com>
Date: Wed, 20 Jan 2021 16:41:16 +0000
From: "Rojewski, Cezary" <cezary.rojewski@...el.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Łukasz Majczak <lma@...ihalf.com>
CC: Marcin Wojtas <mw@...ihalf.com>,
Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
Mateusz Gorski <mateusz.gorski@...ux.intel.com>,
Radoslaw Biernacki <rad@...ihalf.com>,
"Alex Levin" <levinale@...gle.com>,
Guenter Roeck <groeck@...gle.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
Amadeusz Sławiński
<amadeuszx.slawinski@...ux.intel.com>
Subject: RE: [PATCH v2] ASoC: Intel: Skylake: Check the kcontrol against NULL
On 2021-01-20 5:33 PM, Pierre-Louis Bossart wrote:
> 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.
>
Thanks for the CC, Pierre.
...
>>>>
>>>> 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)
Just checked the history behind this. And must say, I liked Ricardo's
version better. Except for the "= {};" bit which Mark already pointed
out - it should be a separate fix - it's simply more optional
e.g.: 'kcontrol' gets assigned yet 'if' above is not updated accordingly:
s/dobj->control.kcontrol->put/kcontrol->put
Czarek
Powered by blists - more mailing lists