diff options
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r-- | sound/usb/card.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index d5b5c3388e28..4a469f0cb6d4 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
@@ -553,7 +553,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, | |||
553 | struct snd_usb_audio *chip) | 553 | struct snd_usb_audio *chip) |
554 | { | 554 | { |
555 | struct snd_card *card; | 555 | struct snd_card *card; |
556 | struct list_head *p; | 556 | struct list_head *p, *n; |
557 | 557 | ||
558 | if (chip == (void *)-1L) | 558 | if (chip == (void *)-1L) |
559 | return; | 559 | return; |
@@ -570,7 +570,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, | |||
570 | snd_usb_stream_disconnect(p); | 570 | snd_usb_stream_disconnect(p); |
571 | } | 571 | } |
572 | /* release the endpoint resources */ | 572 | /* release the endpoint resources */ |
573 | list_for_each(p, &chip->ep_list) { | 573 | list_for_each_safe(p, n, &chip->ep_list) { |
574 | snd_usb_endpoint_free(p); | 574 | snd_usb_endpoint_free(p); |
575 | } | 575 | } |
576 | /* release the midi resources */ | 576 | /* release the midi resources */ |