From: Kishon Vijay Abraham I Date: Fri, 15 Mar 2013 13:28:50 +0000 (+0530) Subject: usb: musb: gadget: do *unmap_dma_buffer* only for valid DMA addr X-Git-Tag: v3.9-rc4~11^2~22^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06d9db7273c7bd5b07624b313faeea57a4b31056;p=pandora-kernel.git usb: musb: gadget: do *unmap_dma_buffer* only for valid DMA addr musb does not use DMA buffer for ep0 but it uses the same giveback function *musb_g_giveback* for all endpoints (*musb_g_ep0_giveback* calls *musb_g_giveback*). So for ep0 case request.dma will be '0' and will result in kernel OOPS if tried to *unmap_dma_buffer* for requests in ep0. Fixed it by doing *unmap_dma_buffer* only for valid DMA addr and checking that musb_ep->dma is valid when unmapping. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed