[alsa-devel] [PATCH 1/2] ALSA: snd-usb: tighten EP_FLAG_RUNNING checks

Clemens Ladisch clemens at ladisch.de
Thu Jul 12 16:29:12 CEST 2012


Daniel Mack wrote:
> In endpoint.c, bail out earlier in case the stream is stopped.
> ...
> @@ -350,7 +350,8 @@ static void snd_complete_urb(struct urb *urb)
>  		     urb->status == -ENODEV ||		/* device removed */
>  		     urb->status == -ECONNRESET ||	/* unlinked */
>  		     urb->status == -ESHUTDOWN ||	/* device disabled */
> -		     ep->chip->shutdown))		/* device disconnected */
> +		     ep->chip->shutdown) ||		/* device disconnected */
> +		     !test_bit(EP_FLAG_RUNNING, &ep->flags))
>  		goto exit_clear;

Is this really needed?
The URBs will be unlinked at the same time.


Regards,
Clemens


More information about the Alsa-devel mailing list