Commit f900a055 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: spi: Drop NULL check for snd_ctl_remove()

Since snd_ctl_remove() accepts the NULL kcontrol argument now, we can
drop the check in the caller side.

Link: https://lore.kernel.org/20240617100529.6667-6-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9d67a400
......@@ -726,12 +726,8 @@ static int snd_at73c213_mixer(struct snd_at73c213 *chip)
return 0;
cleanup:
for (idx = 1; idx < ARRAY_SIZE(snd_at73c213_controls) + 1; idx++) {
struct snd_kcontrol *kctl;
kctl = snd_ctl_find_numid(card, idx);
if (kctl)
snd_ctl_remove(card, kctl);
}
for (idx = 1; idx < ARRAY_SIZE(snd_at73c213_controls) + 1; idx++)
snd_ctl_remove(card, snd_ctl_find_numid(card, idx));
return errval;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment