alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Daniel Baluta <daniel.baluta@oss.nxp.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Daniel Baluta <daniel.baluta@nxp.com>
Subject: Re: [PATCH v2 10/12] ASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC
Date: Mon, 27 Sep 2021 12:09:20 +0300	[thread overview]
Message-ID: <1ab40375-57fd-a3c6-68d7-9db78a20ed6e@linux.intel.com> (raw)
In-Reply-To: <CAEnQRZDmubE9aLG+7YtTeRTB2euqGpRh8FWqtgV5+h3H3M8JGA@mail.gmail.com>

Hi Daniel,

On 24/09/2021 10:42, Daniel Baluta wrote:
> On Thu, Sep 23, 2021 at 4:04 PM Péter Ujfalusi
> <peter.ujfalusi@linux.intel.com> wrote:
>>
>>
>>
>> On 23/09/2021 15:58, Pierre-Louis Bossart wrote:
>>>
>>>>> +static struct sof_ipc_dai_config *hda_dai_update_config(struct snd_soc_dapm_widget *w,
>>>>> +                                                   int channel)
>>>>>  {
>>>>> +   struct snd_sof_widget *swidget = w->dobj.private;
>>>>>     struct sof_ipc_dai_config *config;
>>>>>     struct snd_sof_dai *sof_dai;
>>>>> -   struct sof_ipc_reply reply;
>>>>> -   int ret = 0;
>>>>>
>>>>> -   list_for_each_entry(sof_dai, &hda_stream->sdev->dai_list, list) {
>>>>> -           if (!sof_dai->cpu_dai_name)
>>>>> -                   continue;
>>>>> +   if (!swidget) {
>>>>> +           dev_err(swidget->scomp->dev, "error: No private data for widget %s\n", w->name);
>>>>
>>>> NULL pointer dereference, just return NULL without the print. The caller
>>>> is printing anyways.
>>>
>>> yes good catch, we need a v3 with the fixes suggested by Peter in
>>> https://github.com/thesofproject/linux/pull/3171/ applied.
>>
>> Only the second patch in the PR is applicable for upstream, but it
>> should be squashed in for v3.
> 
> Thanks Peter, will squash this in and send v3.

As we discussed, I'll send the v3 with the fix.

Thanks for sending the initial versions upstream!

-- 
Péter

  reply	other threads:[~2021-09-27  9:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 14:36 [PATCH v2 00/12] Add support for on demand pipeline setup/destroy Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 01/12] ASoC: topology: change the complete op in snd_soc_tplg_ops to return int Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 02/12] ASoC: SOF: control: Add access field in struct snd_sof_control Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 03/12] ASoC: SOF: topology: Add new token for dynamic pipeline Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 04/12] ASoC: SOF: sof-audio: add helpers for widgets, kcontrols and dai config set up Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 05/12] AsoC: dapm: export a couple of functions Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 06/12] ASoC: SOF: Add new fields to snd_sof_route Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 07/12] ASoC: SOF: restore kcontrols for widget during set up Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 08/12] ASoC: SOF: Don't set up widgets during topology parsing Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 09/12] ASoC: SOF: Introduce widget use_count Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 10/12] ASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC Daniel Baluta
2021-09-23 12:54   ` Péter Ujfalusi
2021-09-23 12:58     ` Pierre-Louis Bossart
2021-09-23 13:00       ` Péter Ujfalusi
2021-09-24  7:42         ` Daniel Baluta
2021-09-27  9:09           ` Péter Ujfalusi [this message]
2021-09-17 14:36 ` [PATCH v2 11/12] ASoC: SOF: Add support for dynamic pipelines Daniel Baluta
2021-09-17 14:36 ` [PATCH v2 12/12] ASoC: SOF: topology: Add kernel parameter for topology verification Daniel Baluta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ab40375-57fd-a3c6-68d7-9db78a20ed6e@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@gmail.com \
    --cc=daniel.baluta@nxp.com \
    --cc=daniel.baluta@oss.nxp.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).