@@ -297,16 +297,13 @@ static void snd_ctl_led_clean(struct snd_card *card)
{
unsigned int group;
struct snd_ctl_led *led;
- struct snd_ctl_led_ctl *lctl;
+ struct snd_ctl_led_ctl *lctl, _lctl;
for (group = 0; group < MAX_LED; group++) {
led = &snd_ctl_leds[group];
-repeat:
- list_for_each_entry(lctl, &led->controls, list)
- if (!card || lctl->card == card) {
+ list_for_each_entry_safe(lctl, _lctl, &led->controls, list)
+ if (!card || lctl->card == card)
snd_ctl_led_ctl_destroy(lctl);
- goto repeat;
- }
}
}
@@ -314,7 +311,7 @@ static int snd_ctl_led_reset(int card_number, unsigned int group)
{
struct snd_card *card;
struct snd_ctl_led *led;
- struct snd_ctl_led_ctl *lctl;
+ struct snd_ctl_led_ctl *lctl, _lctl;
struct snd_kcontrol_volatile *vd;
bool change = false;
@@ -329,14 +326,12 @@ static int snd_ctl_led_reset(int card_number, unsigned int group)
return -ENXIO;
}
led = &snd_ctl_leds[group];
-repeat:
- list_for_each_entry(lctl, &led->controls, list)
+ list_for_each_entry_safe(lctl, _lctl, &led->controls, list)
if (lctl->card == card) {
vd = &lctl->kctl->vd[lctl->index_offset];
vd->access &= ~group_to_access(group);
snd_ctl_led_ctl_destroy(lctl);
change = true;
- goto repeat;
}
mutex_unlock(&snd_ctl_led_mutex);
if (change)