alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: "Péter 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:46:06 +0300	[thread overview]
Message-ID: <2b3f2d22-afcc-4552-b608-783801c7f2b1@kili.mountain> (raw)
In-Reply-To: <692de037-f69f-be82-7f8c-a00e03952c53@linux.intel.com>

On Tue, Mar 21, 2023 at 04:40:05PM +0200, Péter Ujfalusi wrote:
> 
> 
> On 21/03/2023 16:16, Dan Carpenter wrote:
> > 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.
> 
> I'm not sure what you see

No, the patch is correct.  My issue is with the commit message because
it says "will cause issues when we will have support for multiple
controls per widgets."  The bug already causes issues now.

regards,
dan carpenter


  reply	other threads:[~2023-03-21 14:47 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
2023-03-21 14:40   ` Péter Ujfalusi
2023-03-21 14:46     ` Dan Carpenter [this message]
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=2b3f2d22-afcc-4552-b608-783801c7f2b1@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).