Skip to content

Commit

Permalink
ALSA: usb - Release capture substream URBs properly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Sep 8, 2010
1 parent fe6ce80 commit 76195fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 76195fb

Please sign in to comment.