From: Takashi Iwai Date: Wed, 8 Sep 2010 06:27:02 +0000 (+0200) Subject: ALSA: usb - Release capture substream URBs properly X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=76195fb096ca6db2f8bbaffb96e3025aaf1649a0;p=openwrt%2Fstaging%2Fblogic.git 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 Cc: Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/card.c b/sound/usb/card.c index 32e4be8a187c..4eabafa5b037 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; }