forked from Minki/linux
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:
parent
1f54a6ae79
commit
444f4f91fd
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user