alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Cc: lgirdwood@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org,
	pierre-louis.bossart@linux.intel.com,
	ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com
Subject: Re: [PATCH] ASoC: SOF: ipc4-control: Return on error in sof_ipc4_widget_kcontrol_setup()
Date: Tue, 21 Mar 2023 17:16:04 +0300	[thread overview]
Message-ID: <c6e2f1d2-bdc0-4028-a9c3-5a077e52722d@kili.mountain> (raw)
In-Reply-To: <20230321134919.25844-1-peter.ujfalusi@linux.intel.com>

On Tue, Mar 21, 2023 at 03:49:19PM +0200, Peter Ujfalusi wrote:
> The patch adding the bytes control support moved the error check outside
> of the list_for_each_entry() which will cause issues when we will have
> support for multiple controls per widgets.

Even now it causes an issue.  We're exiting the list_for_each_entry()
without hitting a break statement so the scontrol points to somewhere
in the middle of the sdev instead of to a valid scontrol entry.

The scontrol->comp_id will be some garbage value.

regards,
dan carpenter



  reply	other threads:[~2023-03-21 14:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 13:49 [PATCH] ASoC: SOF: ipc4-control: Return on error in sof_ipc4_widget_kcontrol_setup() Peter Ujfalusi
2023-03-21 14:16 ` Dan Carpenter [this message]
2023-03-21 14:40   ` Péter Ujfalusi
2023-03-21 14:46     ` Dan Carpenter
2023-03-21 14:48       ` Péter Ujfalusi
2023-03-22  6:36       ` Péter Ujfalusi
2023-03-23 13:49 ` Mark Brown

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=c6e2f1d2-bdc0-4028-a9c3-5a077e52722d@kili.mountain \
    --to=error27@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --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).