@@ -812,19 +812,18 @@ static void ttusb_dec_process_urb(struct urb *urb)
int i;
for (i = 0; i < FRAMES_PER_ISO_BUF; i++) {
- struct usb_iso_packet_descriptor *d;
- u8 *b;
- int length;
struct urb_frame *frame;
- d = &urb->iso_frame_desc[i];
- b = urb->transfer_buffer + d->offset;
- length = d->actual_length;
-
frame = kmalloc(sizeof(*frame), GFP_ATOMIC);
if (frame) {
unsigned long flags;
+ struct usb_iso_packet_descriptor const *d;
+ u8 const *b;
+ unsigned int length;
+ d = &urb->iso_frame_desc[i];
+ b = urb->transfer_buffer + d->offset;
+ length = d->actual_length;
memcpy(frame->data, b, length);
frame->length = length;