diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-06-17 13:05:27 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-06-18 13:54:34 +0300 |
commit | f900a055f8e279a0f572f54f57b967a99aa7a465 (patch) | |
tree | b7102f584591a040950cad82993adefaac4386cc /sound/spi | |
parent | 9d67a4006f7219577c5c4502d43892feb8773aa6 (diff) | |
download | linux-f900a055f8e279a0f572f54f57b967a99aa7a465.tar.xz |
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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/spi')
-rw-r--r-- | sound/spi/at73c213.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c index 5648d744aa79..8f6929ced2c8 100644 --- a/sound/spi/at73c213.c +++ b/sound/spi/at73c213.c @@ -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; } |