From: Mariusz Kozlowski Date: Thu, 16 Nov 2006 15:38:57 +0000 (+0100) Subject: USB: pwc-if loop fix X-Git-Tag: v2.6.20-rc2~6^2~13^2~477^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=444f4f91fda54bea57a0e31098a75f54548e8b28;p=platform%2Fupstream%2Fkernel-adaptation-pc.git USB: pwc-if loop fix We should free urbs starting at [i-1] not [i]. Signed-off-by: Mariusz Kozlowski Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 46c1148..83739b2 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c @@ -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; }