diff mbox

gspca main: reorganize loop

Message ID 4B124BDF.50309@freemail.hu (mailing list archive)
State Rejected
Headers show

Commit Message

Németh Márton Nov. 29, 2009, 10:24 a.m. UTC
None
diff mbox

Patch

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: