From 0a2bb03fe20f81dc4cac96d7fe0e4194ae6efffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Thu, 13 Aug 2015 01:32:17 -0300 Subject: Linux-libre 4.1.5-gnu --- sound/usb/line6/pcm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'sound/usb/line6/pcm.c') diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c index 8461d6bf9..204cc074a 100644 --- a/sound/usb/line6/pcm.c +++ b/sound/usb/line6/pcm.c @@ -186,12 +186,8 @@ static int line6_stream_start(struct snd_line6_pcm *line6pcm, int direction, int ret = 0; spin_lock_irqsave(&pstr->lock, flags); - if (!test_and_set_bit(type, &pstr->running)) { - if (pstr->active_urbs || pstr->unlink_urbs) { - ret = -EBUSY; - goto error; - } - + if (!test_and_set_bit(type, &pstr->running) && + !(pstr->active_urbs || pstr->unlink_urbs)) { pstr->count = 0; /* Submit all currently available URBs */ if (direction == SNDRV_PCM_STREAM_PLAYBACK) @@ -199,7 +195,6 @@ static int line6_stream_start(struct snd_line6_pcm *line6pcm, int direction, else ret = line6_submit_audio_in_all_urbs(line6pcm); } - error: if (ret < 0) clear_bit(type, &pstr->running); spin_unlock_irqrestore(&pstr->lock, flags); -- cgit v1.2.3