ALSA: usb-audio: clear SUBSTREAM_FLAG_SYNC_EP_STARTED on error

If setting the interface fails, the SUBSTREAM_FLAG_SYNC_EP_STARTED
should be cleared.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Eldad Zack 2013-10-06 22:31:11 +02:00 committed by Takashi Iwai
parent 9b7c552bba
commit 06613f547a

View File

@ -246,6 +246,7 @@ static int start_endpoints(struct snd_usb_substream *subs, bool can_sleep)
subs->sync_endpoint->iface, subs->sync_endpoint->iface,
subs->sync_endpoint->alt_idx); subs->sync_endpoint->alt_idx);
if (err < 0) { if (err < 0) {
clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags);
snd_printk(KERN_ERR snd_printk(KERN_ERR
"%d:%d:%d: cannot set interface (%d)\n", "%d:%d:%d: cannot set interface (%d)\n",
subs->dev->devnum, subs->dev->devnum,