Re: [PATCH v4 05/22] ASoC: ops: Introduce 'snd_soc_ctl_activate'
From: Mark Brown
Date: Mon Nov 09 2026 - 16:01:30 EST
> This function mirrors wraps the sound/core 'snd_ctl_activate_id'
> for ASoC. Machine drivers may call it to lock down kcontrols
> during fixup_controls.
> +int snd_soc_ctl_activate(struct snd_soc_card *card,
> + const char *name, int active)
> +{
> + struct snd_kcontrol *kctl;
> + int ret = -EINVAL;
> + kctl = snd_soc_card_get_kcontrol(card, name);
> +
> + if (kctl) {
> + ret = snd_ctl_activate_id(card->snd_card, &kctl->id, active);
> + if (ret < 0)
As Cezary pointed out this return is redundant, we could just exit above
if there's no kctl.
--
Mark Brown <broonie@xxxxxxxxxx>