From: "Németh Márton" <nm127@freemail.hu>
To: Jean-Francois Moine <moinejf@free.fr>,
V4L Mailing List <linux-media@vger.kernel.org>
Subject: [PATCH] gspca main: reorganize loop
Date: Sun, 29 Nov 2009 11:24:31 +0100 [thread overview]
Message-ID: <4B124BDF.50309@freemail.hu> (raw)
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:
next reply other threads:[~2009-11-29 10:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-29 10:24 Németh Márton [this message]
2009-11-29 10:38 ` [PATCH] gspca main: reorganize loop Jean-Francois Moine
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=4B124BDF.50309@freemail.hu \
--to=nm127@freemail.hu \
--cc=linux-media@vger.kernel.org \
--cc=moinejf@free.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.