From patchwork Sun Nov 29 10:24:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TsODwqltZXRoIE3Dg8KhcnRvbg==?= X-Patchwork-Id: 63511 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nATAOePQ031513 for ; Sun, 29 Nov 2009 10:24:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753275AbZK2KYb (ORCPT ); Sun, 29 Nov 2009 05:24:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753080AbZK2KYb (ORCPT ); Sun, 29 Nov 2009 05:24:31 -0500 Received: from mail01d.mail.t-online.hu ([84.2.42.6]:62973 "EHLO mail01d.mail.t-online.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbZK2KYa (ORCPT ); Sun, 29 Nov 2009 05:24:30 -0500 Received: from [192.168.1.64] (dsl5402C4C9.pool.t-online.hu [84.2.196.201]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail01d.mail.t-online.hu (Postfix) with ESMTPSA id 81A05758D00; Sun, 29 Nov 2009 11:23:35 +0100 (CET) Message-ID: <4B124BDF.50309@freemail.hu> Date: Sun, 29 Nov 2009 11:24:31 +0100 From: =?UTF-8?B?TsOpbWV0aCBNw6FydG9u?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.8.1.21) Gecko/20090402 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Jean-Francois Moine , V4L Mailing List Subject: [PATCH] gspca main: reorganize loop X-DCC-mail.t-online.hu-Metrics: mail01d.mail.t-online.hu 32721; Body=2 Fuz1=2 Fuz2=2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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: