Commit 444f4f91 authored by Mariusz Kozlowski's avatar Mariusz Kozlowski Committed by Greg Kroah-Hartman

USB: pwc-if loop fix

We should free urbs starting at [i-1] not [i].
Signed-off-by: default avatarMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1f54a6ae
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment