Commit 2a0f9277 authored by Hunyue Yau's avatar Hunyue Yau Committed by Tony Lindgren

fix NULL pointer with MUSB and DMA on ISO ep

For the case of an isochonous endpoint, musb_write_fifo may be
called with a NULL buffer from musb_host_tx if DMA is enabled.
Remove DMA check and always supply a valid buffer as long as
the URB contains a valid buffer.
Signed-off-by: default avatarHunyue Yau <hyau@mvista.com>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
parent c69036d6
...@@ -1268,7 +1268,7 @@ void musb_host_tx(struct musb *musb, u8 epnum) ...@@ -1268,7 +1268,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
d->actual_length = qh->segsize; d->actual_length = qh->segsize;
if (++qh->iso_idx >= urb->number_of_packets) { if (++qh->iso_idx >= urb->number_of_packets) {
done = true; done = true;
} else if (!dma) { } else {
d++; d++;
buf = urb->transfer_buffer + d->offset; buf = urb->transfer_buffer + d->offset;
wLength = d->length; wLength = d->length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment