|
@@ -148,7 +148,7 @@ static int usb_bulk_urb_init(struct usb_data_stream *stream)
|
|
|
if (!stream->urb_list[i]) {
|
|
|
deb_mem("not enough memory for urb_alloc_urb!.\n");
|
|
|
for (j = 0; j < i; j++)
|
|
|
- usb_free_urb(stream->urb_list[i]);
|
|
|
+ usb_free_urb(stream->urb_list[j]);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
usb_fill_bulk_urb( stream->urb_list[i], stream->udev,
|
|
@@ -181,7 +181,7 @@ static int usb_isoc_urb_init(struct usb_data_stream *stream)
|
|
|
if (!stream->urb_list[i]) {
|
|
|
deb_mem("not enough memory for urb_alloc_urb!\n");
|
|
|
for (j = 0; j < i; j++)
|
|
|
- usb_free_urb(stream->urb_list[i]);
|
|
|
+ usb_free_urb(stream->urb_list[j]);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
|