summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pwc/pwc-if.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-11-26 23:38:42 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-11-26 23:38:42 -0200
commit080a587ad1c509488047ab48c14f424b3e3c2cd9 (patch)
treefa303d48ebfc6851246e89647b9c44983a3cf144 /linux/drivers/media/video/pwc/pwc-if.c
parentfe7037815818624889adae1f5dce6bd6e65a46bd (diff)
downloadmediapointer-dvb-s2-080a587ad1c509488047ab48c14f424b3e3c2cd9.tar.gz
mediapointer-dvb-s2-080a587ad1c509488047ab48c14f424b3e3c2cd9.tar.bz2
usb: pwc-if loop fix
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl> We should free urbs starting at [i-1] not [i]. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/pwc/pwc-if.c')
-rw-r--r--linux/drivers/media/video/pwc/pwc-if.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c
index 3c83629b1..3592202c1 100644
--- a/linux/drivers/media/video/pwc/pwc-if.c
+++ b/linux/drivers/media/video/pwc/pwc-if.c
@@ -903,11 +903,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;
}