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>
This commit is contained in:
Mariusz Kozlowski 2006-11-16 16:38:57 +01:00 committed by Greg Kroah-Hartman
parent 1f54a6ae79
commit 444f4f91fd

View 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;
}