Skip to content

Commit

Permalink
ALSA: spi: Drop NULL check for snd_ctl_remove()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
tiwai committed Jun 18, 2024
1 parent 9d67a40 commit f900a05
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sound/spi/at73c213.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f900a05

Please sign in to comment.