diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-08 02:27:02 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-08 02:27:02 -0400 |
commit | 76195fb096ca6db2f8bbaffb96e3025aaf1649a0 (patch) | |
tree | 695e9030c4d07cee2a6db66f431d6997ec9071e7 | |
parent | fe6ce80ae25953d95ebaf9bce27b585218cda25c (diff) |
ALSA: usb - Release capture substream URBs properly
Due to the wrong "return" in the loop, a capture substream won't be
released at disconnection properly if the device is capture only and has
no playback substream. This caused Oops occasionally at the device
reconnection.
Reported-by: Kim Minhyoung <minhyoung.kim@lge.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/usb/card.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 32e4be8a187..4eabafa5b03 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
@@ -126,7 +126,7 @@ static void snd_usb_stream_disconnect(struct list_head *head) | |||
126 | for (idx = 0; idx < 2; idx++) { | 126 | for (idx = 0; idx < 2; idx++) { |
127 | subs = &as->substream[idx]; | 127 | subs = &as->substream[idx]; |
128 | if (!subs->num_formats) | 128 | if (!subs->num_formats) |
129 | return; | 129 | continue; |
130 | snd_usb_release_substream_urbs(subs, 1); | 130 | snd_usb_release_substream_urbs(subs, 1); |
131 | subs->interface = -1; | 131 | subs->interface = -1; |
132 | } | 132 | } |