Message ID | 20210505112325.321284952@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
--- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -1442,11 +1442,11 @@ void snd_usb_endpoint_stop(struct snd_us if (snd_BUG_ON(!atomic_read(&ep->running))) return; - if (ep->sync_source) - WRITE_ONCE(ep->sync_source->sync_sink, NULL); - - if (!atomic_dec_return(&ep->running)) + if (!atomic_dec_return(&ep->running)) { + if (ep->sync_source) + WRITE_ONCE(ep->sync_source->sync_sink, NULL); stop_urbs(ep, false); + } } /**