From 2a0f92772e3137bb0fafd0a29817ec6a0b7e5b21 Mon Sep 17 00:00:00 2001 From: Hunyue Yau Date: Thu, 1 Nov 2007 15:40:49 -0700 Subject: [PATCH] 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 --- drivers/usb/musb/musb_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.41.3