Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: linux-sound@vger.kernel.org
Subject: Re: [PATCH 3/5] ALSA: emu10k1:  Drop NULL check for snd_ctl_remove()
Date: Tue, 18 Jun 2024 12:53:33 +0200	[thread overview]
Message-ID: <87cyoe7c9e.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240617100529.6667-4-tiwai@suse.de>

On Mon, 17 Jun 2024 12:05:25 +0200,
Takashi Iwai wrote:
> 
> Since snd_ctl_remove() accepts the NULL kcontrol argument now, we can
> drop the check in the caller side.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

Grrr, this is utterly broken.  Scratch this one.
Sorry for the noise.


Takashi

> ---
>  sound/pci/emu10k1/emufx.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
> index 03efc317e05f..34f385b5cd46 100644
> --- a/sound/pci/emu10k1/emufx.c
> +++ b/sound/pci/emu10k1/emufx.c
> @@ -959,7 +959,6 @@ static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu,
>  {
>  	unsigned int i;
>  	struct emu10k1_ctl_elem_id id;
> -	struct snd_emu10k1_fx8010_ctl *ctl;
>  	struct snd_card *card = emu->card;
>  	int err;
>  	
> @@ -968,9 +967,7 @@ static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu,
>  				       in_kernel);
>  		if (err < 0)
>  			return err;
> -		ctl = snd_emu10k1_look_for_ctl(emu, &id);
> -		if (ctl)
> -			snd_ctl_remove(card, ctl->kcontrol);
> +		snd_ctl_remove(card, snd_emu10k1_look_for_ctl(emu, &id));
>  	}
>  	return 0;
>  }
> -- 
> 2.43.0
> 

  reply	other threads:[~2024-06-18 10:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 10:05 [PATCH 0/5] ALSA: Allow NULL passed to snd_ctl_remove() Takashi Iwai
2024-06-17 10:05 ` [PATCH 1/5] ALSA: control: " Takashi Iwai
2024-06-17 10:05 ` [PATCH 2/5] ALSA: sb: Drop NULL check for snd_ctl_remove() Takashi Iwai
2024-06-17 10:05 ` [PATCH 3/5] ALSA: emu10k1: " Takashi Iwai
2024-06-18 10:53   ` Takashi Iwai [this message]
2024-06-17 10:05 ` [PATCH 4/5] ALSA: hda: " Takashi Iwai
2024-06-17 10:05 ` [PATCH 5/5] ALSA: spi: " Takashi Iwai

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=87cyoe7c9e.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-sound@vger.kernel.org \
    /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