On Sun, Mar 06, 2011 at 12:55:25AM +0200, Tomas Winkler wrote:
> diff --git a/drivers/staging/easycap/easycap_sound.c 
> b/drivers/staging/easycap/easycap_sound.c
> index 5829e26..0164132 100644
> --- a/drivers/staging/easycap/easycap_sound.c
> +++ b/drivers/staging/easycap/easycap_sound.c
> @@ -142,122 +142,118 @@ easycap_alsa_complete(struct urb *purb)
>                           strerror(purb->iso_frame_desc[i].status),
>                           purb->iso_frame_desc[i].status);
>               }
> -             if (!purb->iso_frame_desc[i].status) {
> -                     more = purb->iso_frame_desc[i].actual_length;
> -                     if (!more)
> -                             peasycap->audio_mt++;
> -                     else {
> -                             if (peasycap->audio_mt) {
> -                                     JOM(12, "%4i empty audio urb frames\n",
> -                                         peasycap->audio_mt);
> -                                     peasycap->audio_mt = 0;
> -                             }
> +             if (purb->iso_frame_desc[i].status == 0) {

Isn't this test reversed?  Status is non-zero on errors.

> +                     JOM(12, "discarding audio samples because "
> +                         "%i=purb->iso_frame_desc[i].status\n",
> +                         purb->iso_frame_desc[i].status);
> +                     continue;
> +             }

regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to