diff options
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r-- | drivers/usb/misc/usbtest.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 0cfbd789ddf2..d92b7ec9a230 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -1378,7 +1378,6 @@ static void iso_callback (struct urb *urb) | |||
1378 | break; | 1378 | break; |
1379 | } | 1379 | } |
1380 | } | 1380 | } |
1381 | simple_free_urb (urb); | ||
1382 | 1381 | ||
1383 | ctx->pending--; | 1382 | ctx->pending--; |
1384 | if (ctx->pending == 0) { | 1383 | if (ctx->pending == 0) { |
@@ -1495,6 +1494,7 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param, | |||
1495 | } | 1494 | } |
1496 | 1495 | ||
1497 | simple_free_urb (urbs [i]); | 1496 | simple_free_urb (urbs [i]); |
1497 | urbs[i] = NULL; | ||
1498 | context.pending--; | 1498 | context.pending--; |
1499 | context.submit_error = 1; | 1499 | context.submit_error = 1; |
1500 | break; | 1500 | break; |
@@ -1504,6 +1504,10 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param, | |||
1504 | 1504 | ||
1505 | wait_for_completion (&context.done); | 1505 | wait_for_completion (&context.done); |
1506 | 1506 | ||
1507 | for (i = 0; i < param->sglen; i++) { | ||
1508 | if (urbs[i]) | ||
1509 | simple_free_urb(urbs[i]); | ||
1510 | } | ||
1507 | /* | 1511 | /* |
1508 | * Isochronous transfers are expected to fail sometimes. As an | 1512 | * Isochronous transfers are expected to fail sometimes. As an |
1509 | * arbitrary limit, we will report an error if any submissions | 1513 | * arbitrary limit, we will report an error if any submissions |