summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2006-11-16 16:38:57 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 14:23:31 -0800
commit444f4f91fda54bea57a0e31098a75f54548e8b28 (patch)
tree6fbddf83ddba64b06ce7916b28c539770d3ec3c2 /drivers/media/video/pwc
parent1f54a6ae79ab4369f17d6bc86eaff3125395af9c (diff)
downloadblackbird-op-linux-444f4f91fda54bea57a0e31098a75f54548e8b28.tar.gz
blackbird-op-linux-444f4f91fda54bea57a0e31098a75f54548e8b28.zip
USB: pwc-if loop fix
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>
Diffstat (limited to 'drivers/media/video/pwc')
-rw-r--r--drivers/media/video/pwc/pwc-if.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 46c114830884..83739b213e7f 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;
}
OpenPOWER on IntegriCloud