Skip to content

Commit f900a05

Browse files
committed
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/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 9d67a40 commit f900a05

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sound/spi/at73c213.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -726,12 +726,8 @@ static int snd_at73c213_mixer(struct snd_at73c213 *chip)
726726
return 0;
727727

728728
cleanup:
729-
for (idx = 1; idx < ARRAY_SIZE(snd_at73c213_controls) + 1; idx++) {
730-
struct snd_kcontrol *kctl;
731-
kctl = snd_ctl_find_numid(card, idx);
732-
if (kctl)
733-
snd_ctl_remove(card, kctl);
734-
}
729+
for (idx = 1; idx < ARRAY_SIZE(snd_at73c213_controls) + 1; idx++)
730+
snd_ctl_remove(card, snd_ctl_find_numid(card, idx));
735731
return errval;
736732
}
737733

0 commit comments

Comments
 (0)