]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: pwc-if loop fix
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Thu, 16 Nov 2006 15:38:57 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:23:31 +0000 (14:23 -0800)
We should free urbs starting at [i-1] not [i].

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/pwc/pwc-if.c

index 46c1148308843a4d8ed3e0db02d6f20fd8f73c76..83739b213e7f5ed9c31e641d089130ace9e68660 100644 (file)
@@ -866,11 +866,10 @@ int pwc_isoc_init(struct pwc_device *pdev)
        }
        if (ret) {
                /* De-allocate in reverse order */
-               while (i >= 0) {
+               while (i--) {
                        if (pdev->sbuf[i].urb != NULL)
                                usb_free_urb(pdev->sbuf[i].urb);
                        pdev->sbuf[i].urb = NULL;
-                       i--;
                }
                return ret;
        }