Linux Media Controller development
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: V4L Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] gspca main: reorganize loop
Date: Sun, 29 Nov 2009 11:38:34 +0100	[thread overview]
Message-ID: <20091129113834.6b47767a@tele> (raw)
In-Reply-To: <4B124BDF.50309@freemail.hu>

On Sun, 29 Nov 2009 11:24:31 +0100
Németh Márton <nm127@freemail.hu> wrote:

> From: Márton Németh <nm127@freemail.hu>
> 
> Eliminate redundant code by reorganizing the loop.
> 
> Signed-off-by: Márton Németh <nm127@freemail.hu>
> ---
> diff -r 064a82aa2daa linux/drivers/media/video/gspca/gspca.c
> --- a/linux/drivers/media/video/gspca/gspca.c	Thu Nov 26
> 19:36:40 2009 +0100 +++
> b/linux/drivers/media/video/gspca/gspca.c	Sun Nov 29 11:09:33
> 2009 +0100 @@ -623,12 +623,12 @@ if (ret < 0)
>  			goto out;
>  	}
> -	ep = get_ep(gspca_dev);
> -	if (ep == NULL) {
> -		ret = -EIO;
> -		goto out;
> -	}
>  	for (;;) {
> +		ep = get_ep(gspca_dev);
> +		if (ep == NULL) {
> +			ret = -EIO;
> +			goto out;
> +		}
>  		PDEBUG(D_STREAM, "init transfer alt %d",
> gspca_dev->alt); ret = create_urbs(gspca_dev, ep);
>  		if (ret < 0)
> @@ -677,12 +677,6 @@
>  			ret =
> gspca_dev->sd_desc->isoc_nego(gspca_dev); if (ret < 0)
>  				goto out;
> -		} else {
> -			ep = get_ep(gspca_dev);
> -			if (ep == NULL) {
> -				ret = -EIO;
> -				goto out;
> -			}
>  		}
>  	}
>  out:

Hello Márton,

As you may see, in the loop, get_ep() is called only when isoc_nego()
is not called. So, your patch does not work.

Regards.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

  reply	other threads:[~2009-11-29 10:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-29 10:24 [PATCH] gspca main: reorganize loop Németh Márton
2009-11-29 10:38 ` Jean-Francois Moine [this message]
2009-11-29 11:19   ` Németh Márton
2009-11-29 12:15     ` Jean-Francois Moine
2009-11-29 16:33       ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091129113834.6b47767a@tele \
    --to=moinejf@free.fr \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox