diff options
-rw-r--r-- | sound/usb/endpoint.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index a2cdf3370afe..15d1d5c63c3c 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c | |||
@@ -384,9 +384,6 @@ static void snd_complete_urb(struct urb *urb) | |||
384 | if (unlikely(atomic_read(&ep->chip->shutdown))) | 384 | if (unlikely(atomic_read(&ep->chip->shutdown))) |
385 | goto exit_clear; | 385 | goto exit_clear; |
386 | 386 | ||
387 | if (unlikely(!test_bit(EP_FLAG_RUNNING, &ep->flags))) | ||
388 | goto exit_clear; | ||
389 | |||
390 | if (usb_pipeout(ep->pipe)) { | 387 | if (usb_pipeout(ep->pipe)) { |
391 | retire_outbound_urb(ep, ctx); | 388 | retire_outbound_urb(ep, ctx); |
392 | /* can be stopped during retire callback */ | 389 | /* can be stopped during retire callback */ |
@@ -537,11 +534,6 @@ static int wait_clear_urbs(struct snd_usb_endpoint *ep) | |||
537 | alive, ep->ep_num); | 534 | alive, ep->ep_num); |
538 | clear_bit(EP_FLAG_STOPPING, &ep->flags); | 535 | clear_bit(EP_FLAG_STOPPING, &ep->flags); |
539 | 536 | ||
540 | ep->data_subs = NULL; | ||
541 | ep->sync_slave = NULL; | ||
542 | ep->retire_data_urb = NULL; | ||
543 | ep->prepare_data_urb = NULL; | ||
544 | |||
545 | return 0; | 537 | return 0; |
546 | } | 538 | } |
547 | 539 | ||
@@ -1028,6 +1020,10 @@ void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep) | |||
1028 | 1020 | ||
1029 | if (--ep->use_count == 0) { | 1021 | if (--ep->use_count == 0) { |
1030 | deactivate_urbs(ep, false); | 1022 | deactivate_urbs(ep, false); |
1023 | ep->data_subs = NULL; | ||
1024 | ep->sync_slave = NULL; | ||
1025 | ep->retire_data_urb = NULL; | ||
1026 | ep->prepare_data_urb = NULL; | ||
1031 | set_bit(EP_FLAG_STOPPING, &ep->flags); | 1027 | set_bit(EP_FLAG_STOPPING, &ep->flags); |
1032 | } | 1028 | } |
1033 | } | 1029 | } |