aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-08 08:27:02 +0200
committerMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>2010-10-04 14:53:32 +0200
commitfe2fea6f4f32874038b54e54cf8c74259beaa93e (patch)
treee183f2a1ef20953041d6470737e28241edb52909 /sound
parent3db96bd1670a1a1169bee237aa9d0a9433dab528 (diff)
ALSA: usb - Release capture substream URBs properly
commit 76195fb096ca6db2f8bbaffb96e3025aaf1649a0 upstream. 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> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/card.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 745bd782faa..d1924d71681 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)
for (idx = 0; idx < 2; idx++) {
subs = &as->substream[idx];
if (!subs->num_formats)
- return;
+ continue;
snd_usb_release_substream_urbs(subs, 1);
subs->interface = -1;
}