From: Hunyue Yau Date: Thu, 1 Nov 2007 22:40:49 +0000 (-0700) Subject: fix NULL pointer with MUSB and DMA on ISO ep X-Git-Tag: v2.6.24-omap1~224 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2a0f92772e3137bb0fafd0a29817ec6a0b7e5b21;p=linux-2.6-omap-h63xx.git 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: Hunyue Yau Acked-by: David Brownell --- diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index d8ea84d3de3..6638dced1f9 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -1268,7 +1268,7 @@ void musb_host_tx(struct musb *musb, u8 epnum) d->actual_length = qh->segsize; if (++qh->iso_idx >= urb->number_of_packets) { done = true; - } else if (!dma) { + } else { d++; buf = urb->transfer_buffer + d->offset; wLength = d->length;