public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Gergo Koteles <soyer@irl.hu>
Cc: Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>,
	Baojun Xu <baojun.xu@ti.com>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: hda/tas2781: leave hda_component in usable state
Date: Sat, 09 Dec 2023 09:10:55 +0100	[thread overview]
Message-ID: <87ttor6bjk.wl-tiwai@suse.de> (raw)
In-Reply-To: <c3e903fedec7d84929664377307019e58dc22494.1702058704.git.soyer@irl.hu>

On Fri, 08 Dec 2023 19:06:49 +0100,
Gergo Koteles wrote:
> 
> @@ -612,9 +612,13 @@ static void tas2781_hda_unbind(struct device *dev,
>  {
>  	struct tasdevice_priv *tas_priv = dev_get_drvdata(dev);
>  	struct hda_component *comps = master_data;
> +	comps = &comps[tas_priv->index];
>  
> -	if (comps[tas_priv->index].dev == dev)
> -		memset(&comps[tas_priv->index], 0, sizeof(*comps));
> +	if (comps->dev == dev) {
> +		comps->dev = NULL;
> +		strscpy(comps->name, "", sizeof(comps->name));

This looks suboptimal.  Either just set *comp->name = 0, or fill all
with memset().


thanks,

Takashi

      reply	other threads:[~2023-12-09  8:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08 18:06 [PATCH v2] ALSA: hda/tas2781: leave hda_component in usable state Gergo Koteles
2023-12-09  8:10 ` Takashi Iwai [this message]

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=87ttor6bjk.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=baojun.xu@ti.com \
    --cc=kevin-lu@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=shenghao-ding@ti.com \
    --cc=soyer@irl.hu \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.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