提交 444f4f91 编写于 作者: M Mariusz Kozlowski 提交者: Greg Kroah-Hartman

USB: pwc-if loop fix

We should free urbs starting at [i-1] not [i].
Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 1f54a6ae
...@@ -866,11 +866,10 @@ int pwc_isoc_init(struct pwc_device *pdev) ...@@ -866,11 +866,10 @@ int pwc_isoc_init(struct pwc_device *pdev)
} }
if (ret) { if (ret) {
/* De-allocate in reverse order */ /* De-allocate in reverse order */
while (i >= 0) { while (i--) {
if (pdev->sbuf[i].urb != NULL) if (pdev->sbuf[i].urb != NULL)
usb_free_urb(pdev->sbuf[i].urb); usb_free_urb(pdev->sbuf[i].urb);
pdev->sbuf[i].urb = NULL; pdev->sbuf[i].urb = NULL;
i--;
} }
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册